From f4fc7f07e7b0aef3d0577f4881adee7f5c7b4335 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 21 Mar 2013 17:34:53 +0100 Subject: added feed annotation test --- tests/controller/FeedControllerTest.php | 70 +++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 tests/controller/FeedControllerTest.php (limited to 'tests') diff --git a/tests/controller/FeedControllerTest.php b/tests/controller/FeedControllerTest.php new file mode 100644 index 000000000..0ab989b6b --- /dev/null +++ b/tests/controller/FeedControllerTest.php @@ -0,0 +1,70 @@ +. +* +*/ + +namespace OCA\News\Controller; + +use \OCA\AppFramework\Http\Request; +use \OCA\AppFramework\Http\JSONResponse; +use \OCA\AppFramework\Utility\ControllerTestUtility; +use \OCA\AppFramework\Db\DoesNotExistException; +use \OCA\AppFramework\Db\MultipleObjectsReturnedException; + +use \OCA\News\Db\Folder; + + +require_once(__DIR__ . "/../classloader.php"); + + +class FeedControllerTest extends ControllerTestUtility { + + private $api; + private $bl; + private $request; + private $controller; + + + /** + * Gets run before each test + */ + public function setUp(){ + $this->api = $this->getAPIMock(); + $this->bl = $this->getMockBuilder('\OCA\News\Bl\FeedBl') + ->disableOriginalConstructor() + ->getMock(); + $this->request = new Request(); + $this->controller = new FeedController($this->api, $this->request, + $this->bl); + } + + + public function testFeedsAnnotations(){ + $methodName = 'feeds'; + $annotations = array('IsAdminExemption', 'IsSubAdminExemption', 'Ajax'); + + $this->assertAnnotations($this->controller, $methodName, $annotations); + } + + +} \ No newline at end of file -- cgit v1.2.3