diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/controller/FeedControllerTest.php | 14 | ||||
-rw-r--r-- | tests/unit/service/FeedServiceTest.php | 5 |
2 files changed, 11 insertions, 8 deletions
diff --git a/tests/unit/controller/FeedControllerTest.php b/tests/unit/controller/FeedControllerTest.php index c756875d2..fc46594a8 100644 --- a/tests/unit/controller/FeedControllerTest.php +++ b/tests/unit/controller/FeedControllerTest.php @@ -229,10 +229,11 @@ class FeedControllerTest extends \PHPUnit_Framework_TestCase { ->method('create') ->with($this->equalTo('hi'), $this->equalTo(4), - $this->equalTo($this->user)) + $this->equalTo($this->user), + $this->equalTo('yo')) ->will($this->returnValue($result['feeds'][0])); - $response = $this->controller->create('hi', 4); + $response = $this->controller->create('hi', 4, 'yo'); $this->assertEquals($result, $response); } @@ -253,10 +254,11 @@ class FeedControllerTest extends \PHPUnit_Framework_TestCase { ->method('create') ->with($this->equalTo('hi'), $this->equalTo(4), - $this->equalTo($this->user)) + $this->equalTo($this->user), + $this->equalTo('yo')) ->will($this->returnValue($result['feeds'][0])); - $response = $this->controller->create('hi', 4); + $response = $this->controller->create('hi', 4, 'yo'); $this->assertEquals($result, $response); } @@ -272,7 +274,7 @@ class FeedControllerTest extends \PHPUnit_Framework_TestCase { ->method('create') ->will($this->throwException($ex)); - $response = $this->controller->create('hi', 4); + $response = $this->controller->create('hi', 4, 'test'); $params = json_decode($response->render(), true); $this->assertEquals($msg, $params['message']); @@ -290,7 +292,7 @@ class FeedControllerTest extends \PHPUnit_Framework_TestCase { ->method('create') ->will($this->throwException($ex)); - $response = $this->controller->create('hi', 4); + $response = $this->controller->create('hi', 4, 'test'); $params = json_decode($response->render(), true); $this->assertEquals($msg, $params['message']); diff --git a/tests/unit/service/FeedServiceTest.php b/tests/unit/service/FeedServiceTest.php index d4174b245..2ec1d7a9b 100644 --- a/tests/unit/service/FeedServiceTest.php +++ b/tests/unit/service/FeedServiceTest.php @@ -116,6 +116,7 @@ class FeedServiceTest extends \PHPUnit_Framework_TestCase { $createdFeed->setUrl($url); $createdFeed->setUrlHash('hsssi'); $createdFeed->setLink($url); + $createdFeed->setTitle('hehoy'); $item1 = new Item(); $item1->setGuidHash('hi'); $item2 = new Item(); @@ -203,7 +204,7 @@ class FeedServiceTest extends \PHPUnit_Framework_TestCase { $this->feedMapper->expects($this->once()) ->method('findByUrlHash') - ->with($this->equalTo($createdFeed->getUrlHash()), + ->with($this->equalTo($createdFeed->getUrlHash()), $this->equalTo($this->user)) ->will($this->throwException($ex)); $this->fetcher->expects($this->once()) @@ -601,7 +602,7 @@ class FeedServiceTest extends \PHPUnit_Framework_TestCase { $this->itemMapper->expects($this->at(1)) ->method('insert') ->with($this->equalTo($item)); - + $this->itemMapper->expects($this->at(2)) ->method('findByGuidHash') ->will($this->returnValue($item)); |