This commit is contained in:
Bernhard Posselt 2013-02-02 00:23:55 +01:00
Родитель 703502d7c4
Коммит d4064fe2c7
1 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -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);
}
}