summaryrefslogtreecommitdiffstats
path: root/tests/unit/controller/ItemApiControllerTest.php
diff options
context:
space:
mode:
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);
}