summaryrefslogtreecommitdiffstats
path: root/tests/unit/controller/ExportControllerTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-05 10:27:28 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-05 10:27:28 +0200
commit7171a3dba0f932bffa2b7bba6e84edf02712cea9 (patch)
tree6006aaa04fec995e858b3ab17b594274cbb0fb44 /tests/unit/controller/ExportControllerTest.php
parentd001da33947a0fa1b65f0e1b5749e9b97bd4b779 (diff)
moved tests into unit directory
Diffstat (limited to 'tests/unit/controller/ExportControllerTest.php')
-rw-r--r--tests/unit/controller/ExportControllerTest.php61
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/unit/controller/ExportControllerTest.php b/tests/unit/controller/ExportControllerTest.php
new file mode 100644
index 000000000..913b091c6
--- /dev/null
+++ b/tests/unit/controller/ExportControllerTest.php
@@ -0,0 +1,61 @@
+<?php
+
+/**
+* ownCloud - News
+*
+* @author Alessandro Copyright
+* @author Bernhard Posselt
+* @copyright 2012 Alessandro Cosentino cosenal@gmail.com
+* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+*
+* You should have received a copy of the GNU Affero General Public
+* License along with this library. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+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;
+
+
+require_once(__DIR__ . "/../../classloader.php");
+
+
+class ExportControllerTest extends ControllerTestUtility {
+
+ private $api;
+ private $request;
+ private $controller;
+
+
+ /**
+ * Gets run before each test
+ */
+ public function setUp(){
+ $this->api = $this->getAPIMock();
+ $this->request = new Request();
+ $this->controller = new ExportController($this->api, $this->request);
+ }
+
+
+ public function testOpmlAnnotations(){
+ $annotations = array('IsAdminExemption', 'IsSubAdminExemption', 'Ajax');
+ $this->assertAnnotations($this->controller, 'opml', $annotations);
+ }
+
+
+} \ No newline at end of file