diff options
Diffstat (limited to 'tests/unit/external/NewsAPITest.php')
-rw-r--r-- | tests/unit/external/NewsAPITest.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/unit/external/NewsAPITest.php b/tests/unit/external/NewsAPITest.php index 84522d75d..07ba00a1e 100644 --- a/tests/unit/external/NewsAPITest.php +++ b/tests/unit/external/NewsAPITest.php @@ -25,11 +25,13 @@ namespace OCA\News\External; +use \OCA\AppFramework\Http\JSONResponse; +use \OCA\AppFramework\Utility\ControllerTestUtility; require_once(__DIR__ . "/../../classloader.php"); -class NewsAPITest extends \PHPUnit_Framework_TestCase { +class NewsAPITest extends ControllerTestUtility { private $api; private $request; @@ -48,6 +50,15 @@ class NewsAPITest extends \PHPUnit_Framework_TestCase { } + private function assertDefaultAnnotations($methodName){ + $annotations = array('IsAdminExemption', 'IsSubAdminExemption', 'Ajax'); + $this->assertAnnotations($this->newsAPI, $methodName, $annotations); + } + + public function testVersionAnnotations(){ + $this->assertDefaultAnnotations('version'); + } + public function testGetVersion(){ $this->api->expects($this->once()) ->method('getAppValue') @@ -62,4 +73,4 @@ class NewsAPITest extends \PHPUnit_Framework_TestCase { } -}
\ No newline at end of file +} |