From de2121d066e85aad0c67c498bcf2fd242824f83b Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 9 Oct 2014 10:02:44 +0200 Subject: More coverage --- tests/unit/controller/ItemControllerTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/unit/controller/ItemControllerTest.php') 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') -- cgit v1.2.3