diff options
-rw-r--r-- | tests/controller/FolderControllerTest.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/controller/FolderControllerTest.php b/tests/controller/FolderControllerTest.php index 684da0ba3..de05f8dee 100644 --- a/tests/controller/FolderControllerTest.php +++ b/tests/controller/FolderControllerTest.php @@ -26,12 +26,13 @@ namespace OCA\News\Controller; use \OCA\AppFramework\Http\Request; +use OCA\AppFramework\Utility\ControllerTestUtility; require_once(__DIR__ . "/../classloader.php"); -class FolderControllerTest extends \PHPUnit_Framework_TestCase { +class FolderControllerTest extends ControllerTestUtility { private $api; private $folderMapper; @@ -43,8 +44,7 @@ class FolderControllerTest extends \PHPUnit_Framework_TestCase { * Gets run before each test */ public function setUp(){ - $this->api = $this->getMock('\OCA\AppFramework\Core\API', - null, array('news')); + $this->api = $this->getAPIMock(); $this->folderMapper = $this->getMock('FolderMapper', array('getAll')); $this->request = new Request(); @@ -77,4 +77,12 @@ class FolderControllerTest extends \PHPUnit_Framework_TestCase { } + public function testGetAllAnnotations(){ + $methodName = 'getAll'; + $annotations = array('IsAdminExemption', 'IsSubAdminExemption'); + + $this->assertAnnotations($this->controller, $methodName, $annotations); + } + + }
\ No newline at end of file |