Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/privacy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Controller/PageControllerTest.php')
-rw-r--r--tests/Unit/Controller/PageControllerTest.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/Unit/Controller/PageControllerTest.php b/tests/Unit/Controller/PageControllerTest.php
new file mode 100644
index 0000000..f089886
--- /dev/null
+++ b/tests/Unit/Controller/PageControllerTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace OCA\Privacy\Tests\Unit\Controller;
+
+use PHPUnit_Framework_TestCase;
+
+use OCP\AppFramework\Http\TemplateResponse;
+
+use OCA\Privacy\Controller\PageController;
+
+
+class PageControllerTest extends PHPUnit_Framework_TestCase {
+ private $controller;
+ private $userId = 'john';
+
+ public function setUp() {
+ $request = $this->getMockBuilder('OCP\IRequest')->getMock();
+
+ $this->controller = new PageController(
+ 'privacy', $request, $this->userId
+ );
+ }
+
+ public function testIndex() {
+ $result = $this->controller->index();
+
+ $this->assertEquals('index', $result->getTemplateName());
+ $this->assertTrue($result instanceof TemplateResponse);
+ }
+
+}