summaryrefslogtreecommitdiffstats
path: root/tests/unit/controller/PageControllerTest.php
diff options
context:
space:
mode:
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