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

github.com/juliushaertl/apporder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNick Bakkegaard <nickbakkegaard@gmail.com>2017-06-30 02:18:36 +0300
committerNick Bakkegaard <nickbakkegaard@gmail.com>2017-06-30 02:18:36 +0300
commitee4e72a2c09cfe953a689e6c4510770d89ee33cc (patch)
treea010632081aeb4c452206f90a017c4c7b09b271b /tests
parent33ca81e2253e4caeb97cbcd663b72d1a0541ae25 (diff)
add AppControllerTest for hidden
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/controller/AppControllerTest.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/controller/AppControllerTest.php b/tests/unit/controller/AppControllerTest.php
index 6842b14..b2b4f4a 100644
--- a/tests/unit/controller/AppControllerTest.php
+++ b/tests/unit/controller/AppControllerTest.php
@@ -79,6 +79,20 @@ class AppControllerTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals($expected, $result);
}
+ public function testIndexHidden() {
+
+ $this->util->expects($this->at(0))
+ ->method('getAppOrder')
+ ->willReturn(json_encode(['/index.php/foo/bar', '/index.php/bar/foo']));
+
+ $this->util->expects($this->at(1))
+ ->method('getAppHidden')
+ ->willReturn(json_encode(['/index.php/foo/bar']));
+ $expected = new Http\RedirectResponse('/index.php/bar/foo');
+ $result = $this->controller->index();
+ $this->assertEquals($expected, $result);
+ }
+
public function testIndexEmpty() {
$this->util->expects($this->once())
->method('getAppOrder')