diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-04-09 01:44:12 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-04-09 22:52:26 +0200 |
commit | 21bd539847f33c3889c4f58f14afd672f54a410a (patch) | |
tree | d6ff27e38727197b60d1c2c47968b7f64d4f5c2f /tests/unit/api/FeedAPITest.php | |
parent | fcef0800a24818305e8a52761b05f87e13206689 (diff) |
ported to owncloud internal appframework classes, confused with how to start the app and define deps
Diffstat (limited to 'tests/unit/api/FeedAPITest.php')
-rw-r--r-- | tests/unit/api/FeedAPITest.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/unit/api/FeedAPITest.php b/tests/unit/api/FeedAPITest.php index 6b2187657..03dd762cb 100644 --- a/tests/unit/api/FeedAPITest.php +++ b/tests/unit/api/FeedAPITest.php @@ -25,11 +25,11 @@ namespace OCA\News\API; -use \OCA\AppFramework\Http\Request; -use \OCA\AppFramework\Http\JSONResponse; -use \OCA\AppFramework\Http\Http; -use \OCA\AppFramework\Utility\ControllerTestUtility; +use \OCP\IRequest; +use \OCP\AppFramework\Http; +use \OCP\AppFramework\Http\JSONResponse; +use \OCA\News\Utility\ControllerTestUtility; use \OCA\News\BusinessLayer\BusinessLayerException; use \OCA\News\BusinessLayer\BusinessLayerConflictException; use \OCA\News\Db\Folder; @@ -52,11 +52,11 @@ class FeedAPITest extends ControllerTestUtility { protected function setUp() { $this->api = $this->getMockBuilder( - '\OCA\AppFramework\Core\API') + '\OCA\News\Core\API') ->disableOriginalConstructor() ->getMock(); $this->request = $this->getMockBuilder( - '\OCA\AppFramework\Http\Request') + '\OCP\IRequest') ->disableOriginalConstructor() ->getMock(); $this->folderBusinessLayer = $this->getMockBuilder( @@ -192,7 +192,7 @@ class FeedAPITest extends ControllerTestUtility { public function testDelete() { - $request = new Request(array('urlParams' => array( + $request = $this->getRequest(array('urlParams' => array( 'feedId' => 2 ))); $this->feedAPI = new FeedAPI( @@ -220,7 +220,7 @@ class FeedAPITest extends ControllerTestUtility { public function testDeleteDoesNotExist() { - $request = new Request(array('urlParams' => array( + $request = $this->getRequest(array('urlParams' => array( 'feedId' => 2 ))); $this->feedAPI = new FeedAPI( @@ -250,7 +250,7 @@ class FeedAPITest extends ControllerTestUtility { $feeds = array( new Feed() ); - $request = new Request(array('params' => array( + $request = $this->getRequest(array('params' => array( 'url' => 'ho', 'folderId' => 3 ))); @@ -294,7 +294,7 @@ class FeedAPITest extends ControllerTestUtility { $feeds = array( new Feed() ); - $request = new Request(array('params' => array( + $request = $this->getRequest(array('params' => array( 'url' => 'ho', 'folderId' => 3 ))); @@ -370,7 +370,7 @@ class FeedAPITest extends ControllerTestUtility { public function testRead() { - $request = new Request(array( + $request = $this->getRequest(array( 'urlParams' => array( 'feedId' => 3 ), @@ -404,7 +404,7 @@ class FeedAPITest extends ControllerTestUtility { public function testMove() { - $request = new Request(array( + $request = $this->getRequest(array( 'urlParams' => array( 'feedId' => 3 ), @@ -441,7 +441,7 @@ class FeedAPITest extends ControllerTestUtility { $feedId = 3; $feedTitle = 'test'; - $request = new Request(array( + $request = $this->getRequest(array( 'urlParams' => array( 'feedId' => $feedId ), @@ -508,7 +508,7 @@ class FeedAPITest extends ControllerTestUtility { public function testUpdate() { $feedId = 3; $userId = 'hi'; - $request = new Request(array('params' => array( + $request = $this->getRequest(array('params' => array( 'feedId' => $feedId, 'userId' => $userId ))); |