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

github.com/nextcloud/ocsms.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2014-09-30 09:49:27 +0400
committerLoic Blot <loic.blot@unix-experience.fr>2014-09-30 09:49:27 +0400
commit860b4a3fb51c817cd6810fcb8b421ac70742e74f (patch)
treec87a2b6ed7f0cd34c6a39b870c45dbc984174dff /tests
parent42df9cc510e5a70d9571f9dfa5181abcab21e84a (diff)
Link App with SmsController
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/controller/PageControllerTest.php53
1 files changed, 0 insertions, 53 deletions
diff --git a/tests/unit/controller/PageControllerTest.php b/tests/unit/controller/PageControllerTest.php
deleted file mode 100644
index baa4136..0000000
--- a/tests/unit/controller/PageControllerTest.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/**
- * ownCloud - ocsms
- *
- * This file is licensed under the Affero General Public License version 3 or
- * later. See the COPYING file.
- *
- * @author Loic Blot <loic.blot@unix-experience.fr>
- * @copyright Loic Blot 2014
- */
-
-namespace OCA\OcSms\Controller;
-
-
-use \OCP\IRequest;
-use \OCP\AppFramework\Http\TemplateResponse;
-use \OCP\AppFramework\Http\JSONResponse;
-
-use \OCA\OcSms\AppInfo\Application;
-
-
-class PageControllerTest extends \PHPUnit_Framework_TestCase {
-
- private $container;
-
- public function setUp () {
- $app = new Application();
- $phpunit = $this;
- $this->container = $app->getContainer();
- $this->container->registerService('Request', function($c) use ($phpunit) {
- return $phpunit->getMockBuilder('\OCP\IRequest')->getMock();
- });
- $this->container->registerParameter('UserId', 'john');
- }
-
-
- public function testIndex () {
- $result = $this->container->query('PageController')->index();
-
- $this->assertEquals(array('user' => 'john'), $result->getParams());
- $this->assertEquals('main', $result->getTemplateName());
- $this->assertTrue($result instanceof TemplateResponse);
- }
-
-
- public function testEcho () {
- $result = $this->container->query('PageController')->doEcho('hi');
-
- $this->assertEquals(array('echo' => 'hi'), $result);
- }
-
-
-} \ No newline at end of file