summaryrefslogtreecommitdiffstats
path: root/tests/unit/controller/PageControllerTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-14 18:08:52 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-14 18:08:52 +0200
commitd9acb9ed876d9814e468081d799f06ffd631580f (patch)
tree887653ca34a9b67adeb60435b3dd37f7329619c3 /tests/unit/controller/PageControllerTest.php
parentf52cdaa750f1efa8cb76f6d88c9b1dc291f7b328 (diff)
add serverside possibility to order by oldest first
Diffstat (limited to 'tests/unit/controller/PageControllerTest.php')
-rw-r--r--tests/unit/controller/PageControllerTest.php32
1 files changed, 29 insertions, 3 deletions
diff --git a/tests/unit/controller/PageControllerTest.php b/tests/unit/controller/PageControllerTest.php
index d4c53e468..1e898c146 100644
--- a/tests/unit/controller/PageControllerTest.php
+++ b/tests/unit/controller/PageControllerTest.php
@@ -60,7 +60,9 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase {
$result = [
'showAll' => true,
'compact' => true,
- 'language' => 'de'
+ 'readOnScroll' => true,
+ 'oldestFirst' => true,
+ 'language' => 'de',
];
$this->l10n->expects($this->once())
@@ -78,6 +80,18 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase {
$this->equalTo($this->appName),
$this->equalTo('compact'))
->will($this->returnValue('1'));
+ $this->settings->expects($this->at(2))
+ ->method('getUserValue')
+ ->with($this->equalTo($this->user),
+ $this->equalTo($this->appName),
+ $this->equalTo('readOnScroll'))
+ ->will($this->returnValue('1'));
+ $this->settings->expects($this->at(3))
+ ->method('getUserValue')
+ ->with($this->equalTo($this->user),
+ $this->equalTo($this->appName),
+ $this->equalTo('oldestFirst'))
+ ->will($this->returnValue('1'));
$response = $this->controller->settings();
$this->assertEquals($result, $response);
@@ -97,7 +111,19 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase {
$this->equalTo($this->appName),
$this->equalTo('compact'),
$this->equalTo(true));
- $this->controller->updateSettings(true, true);
+ $this->settings->expects($this->at(2))
+ ->method('setUserValue')
+ ->with($this->equalTo($this->user),
+ $this->equalTo($this->appName),
+ $this->equalTo('readOnScroll'),
+ $this->equalTo(true));
+ $this->settings->expects($this->at(3))
+ ->method('setUserValue')
+ ->with($this->equalTo($this->user),
+ $this->equalTo($this->appName),
+ $this->equalTo('oldestFirst'),
+ $this->equalTo(true));
+ $this->controller->updateSettings(true, true, true, true);
}
@@ -113,7 +139,7 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase {
$this->equalTo('showAll'),
$this->equalTo(true));
- $this->controller->updateSettings(true, null);
+ $this->controller->updateSettings(true, null, null, null);
}
} \ No newline at end of file