diff options
author | Nick Bakkegaard <nickbakkegaard@gmail.com> | 2017-06-30 02:18:36 +0300 |
---|---|---|
committer | Nick Bakkegaard <nickbakkegaard@gmail.com> | 2017-06-30 02:18:36 +0300 |
commit | ee4e72a2c09cfe953a689e6c4510770d89ee33cc (patch) | |
tree | a010632081aeb4c452206f90a017c4c7b09b271b /tests | |
parent | 33ca81e2253e4caeb97cbcd663b72d1a0541ae25 (diff) |
add AppControllerTest for hidden
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/controller/AppControllerTest.php | 14 |
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') |