diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-09 10:02:44 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-09 10:02:44 +0200 |
commit | de2121d066e85aad0c67c498bcf2fd242824f83b (patch) | |
tree | cae3b1f72f68142b4ca1b3a4a6eadc9a35274557 /tests/unit/controller/ItemControllerTest.php | |
parent | 462e62598d9c9ce8bb1732ffefdc52caa4abc2b3 (diff) |
More coverage
Diffstat (limited to 'tests/unit/controller/ItemControllerTest.php')
-rw-r--r-- | tests/unit/controller/ItemControllerTest.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/unit/controller/ItemControllerTest.php b/tests/unit/controller/ItemControllerTest.php index b5a579783..b366fdfa0 100644 --- a/tests/unit/controller/ItemControllerTest.php +++ b/tests/unit/controller/ItemControllerTest.php @@ -100,6 +100,22 @@ class ItemControllerTest extends \PHPUnit_Framework_TestCase { } + public function testReadMultipleDontStopOnException() { + $this->itemService->expects($this->at(0)) + ->method('read') + ->with($this->equalTo(2), + $this->equalTo(true), + $this->equalTo($this->user)) + ->will($this->throwException(new ServiceNotFoundException('yo'))); + $this->itemService->expects($this->at(1)) + ->method('read') + ->with($this->equalTo(4), + $this->equalTo(true), + $this->equalTo($this->user)); + $this->controller->readMultiple([2, 4]); + } + + public function testStar(){ $this->itemService->expects($this->once()) ->method('star') |