diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-12-03 10:40:41 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-12-03 10:40:41 +0100 |
commit | 8e74fa253deea78486df2324071c94654bdca503 (patch) | |
tree | d4d7a0680d540028f2170fa8f4ecc277fe6076d3 /tests/unit/controller | |
parent | 1c7837c7cc324e11966bcebb9f5ca61ae29519a9 (diff) |
Make expand entries in compact view after jumping to next/previous feed optional with a setting
Diffstat (limited to 'tests/unit/controller')
-rw-r--r-- | tests/unit/controller/PageControllerTest.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/unit/controller/PageControllerTest.php b/tests/unit/controller/PageControllerTest.php index ee138fded..fd548df62 100644 --- a/tests/unit/controller/PageControllerTest.php +++ b/tests/unit/controller/PageControllerTest.php @@ -142,6 +142,7 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { 'compact' => true, 'preventReadOnScroll' => true, 'oldestFirst' => true, + 'compactExpand' => true, 'language' => 'de', 'exploreUrl' => 'test' ] @@ -174,6 +175,12 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { $this->equalTo($this->appName), $this->equalTo('oldestFirst')) ->will($this->returnValue('1')); + $this->settings->expects($this->at(4)) + ->method('getUserValue') + ->with($this->equalTo($this->user), + $this->equalTo($this->appName), + $this->equalTo('compactExpand')) + ->will($this->returnValue('1')); $this->config->expects($this->once()) ->method('getExploreUrl') ->will($this->returnValue(' ')); @@ -196,6 +203,7 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { 'preventReadOnScroll' => true, 'oldestFirst' => true, 'language' => 'de', + 'compactExpand' => true, 'exploreUrl' => 'abc' ] ]; @@ -227,6 +235,12 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { $this->equalTo($this->appName), $this->equalTo('oldestFirst')) ->will($this->returnValue('1')); + $this->settings->expects($this->at(4)) + ->method('getUserValue') + ->with($this->equalTo($this->user), + $this->equalTo($this->appName), + $this->equalTo('compactExpand')) + ->will($this->returnValue('1')); $this->config->expects($this->once()) ->method('getExploreUrl') ->will($this->returnValue('abc')); @@ -263,7 +277,13 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { $this->equalTo($this->appName), $this->equalTo('oldestFirst'), $this->equalTo(true)); - $this->controller->updateSettings(true, true, false, true); + $this->settings->expects($this->at(4)) + ->method('setUserValue') + ->with($this->equalTo($this->user), + $this->equalTo($this->appName), + $this->equalTo('compactExpand'), + $this->equalTo(true)); + $this->controller->updateSettings(true, true, false, true, true); } |