summaryrefslogtreecommitdiffstats
path: root/tests/unit/controller/ItemApiControllerTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-29 22:58:30 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-29 22:58:30 +0200
commitcba949fb0771c832326fc7886cced2bdc37e7536 (patch)
tree9e1a335a83a6006f645c801b762db7525e4c6c59 /tests/unit/controller/ItemApiControllerTest.php
parentb91ef01fdbf14c6a5d58e5c471dbb1fc9d17cdfb (diff)
order by pubdate
Diffstat (limited to 'tests/unit/controller/ItemApiControllerTest.php')
-rw-r--r--tests/unit/controller/ItemApiControllerTest.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/unit/controller/ItemApiControllerTest.php b/tests/unit/controller/ItemApiControllerTest.php
index d95d67594..e1e91b424 100644
--- a/tests/unit/controller/ItemApiControllerTest.php
+++ b/tests/unit/controller/ItemApiControllerTest.php
@@ -61,14 +61,17 @@ class ItemApiControllerTest extends \PHPUnit_Framework_TestCase {
$this->equalTo(1),
$this->equalTo(30),
$this->equalTo(20),
- $this->equalTo(false),
+ $this->equalTo(true),
+ $this->equalTo(true),
$this->equalTo($this->user)
)
->will($this->returnValue($items));
- $response = $this->itemAPI->index(1, 2, false, 30, 20);
+ $response = $this->itemAPI->index(1, 2, true, 30, 20, true);
- $this->assertEquals($items, $response);
+ $this->assertEquals([
+ 'items' => [$items[0]->toApi()]
+ ], $response);
}
@@ -83,13 +86,16 @@ class ItemApiControllerTest extends \PHPUnit_Framework_TestCase {
$this->equalTo(20),
$this->equalTo(0),
$this->equalTo(false),
+ $this->equalTo(false),
$this->equalTo($this->user)
)
->will($this->returnValue($items));
$response = $this->itemAPI->index(1, 2, false);
- $this->assertEquals($items, $response);
+ $this->assertEquals([
+ 'items' => [$items[0]->toApi()]
+ ], $response);
}
@@ -109,7 +115,9 @@ class ItemApiControllerTest extends \PHPUnit_Framework_TestCase {
$response = $this->itemAPI->updated(1, 2, 30);
- $this->assertEquals($items, $response);
+ $this->assertEquals([
+ 'items' => [$items[0]->toApi()]
+ ], $response);
}