summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoranoy <anoymouserver+github@mailbox.org>2020-10-02 14:34:46 +0200
committerSean Molenaar <SMillerDev@users.noreply.github.com>2020-10-02 15:43:06 +0200
commit4fffe42eb9064373cbdedd90f1c4dc3e9fa82c29 (patch)
tree7fe97edb91175a80f67b3ad4ce60379933a015f0 /tests
parent9e84bf054e63af3844c39919f3185c19c26ed014 (diff)
fix incorrect cron recommendation
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Service/StatusServiceTest.php36
1 files changed, 12 insertions, 24 deletions
diff --git a/tests/Unit/Service/StatusServiceTest.php b/tests/Unit/Service/StatusServiceTest.php
index ee2e19614..8ffed5073 100644
--- a/tests/Unit/Service/StatusServiceTest.php
+++ b/tests/Unit/Service/StatusServiceTest.php
@@ -52,22 +52,19 @@ class StatusServiceTest extends TestCase
*/
public function testGetStatus()
{
- $this->settings->expects($this->exactly(2))
+ $this->settings->expects($this->exactly(3))
->method('getAppValue')
->withConsecutive(
['news', 'installed_version'],
+ ['core', 'backgroundjobs_mode'],
['news', 'useCronUpdates']
)
->will($this->returnValueMap([
['news', 'installed_version', '', '1.0'],
+ ['core', 'backgroundjobs_mode', '', 'cron'],
['news', 'useCronUpdates', true, true],
]));
- $this->settings->expects($this->exactly(1))
- ->method('getSystemValue')
- ->with('backgroundjobs_mode')
- ->will($this->returnValue('cron'));
-
$this->connection->expects($this->exactly(1))
->method('supports4ByteText')
->will($this->returnValue(true));
@@ -88,22 +85,19 @@ class StatusServiceTest extends TestCase
*/
public function testGetStatusNoCorrectCronAjax()
{
- $this->settings->expects($this->exactly(2))
+ $this->settings->expects($this->exactly(3))
->method('getAppValue')
->withConsecutive(
['news', 'installed_version'],
+ ['core', 'backgroundjobs_mode'],
['news', 'useCronUpdates']
)
->will($this->returnValueMap([
['news', 'installed_version', '', '1.0'],
+ ['core', 'backgroundjobs_mode', '', 'ajax'],
['news', 'useCronUpdates', true, true],
]));
- $this->settings->expects($this->exactly(1))
- ->method('getSystemValue')
- ->with('backgroundjobs_mode')
- ->will($this->returnValue('ajax'));
-
$this->connection->expects($this->exactly(1))
->method('supports4ByteText')
->will($this->returnValue(true));
@@ -124,22 +118,19 @@ class StatusServiceTest extends TestCase
*/
public function testGetStatusNoCorrectCronTurnedOff()
{
- $this->settings->expects($this->exactly(2))
+ $this->settings->expects($this->exactly(3))
->method('getAppValue')
->withConsecutive(
['news', 'installed_version'],
+ ['core', 'backgroundjobs_mode'],
['news', 'useCronUpdates']
)
->will($this->returnValueMap([
['news', 'installed_version', '', '1.0'],
+ ['core', 'backgroundjobs_mode', '', 'ajax'],
['news', 'useCronUpdates', true, false],
]));
- $this->settings->expects($this->exactly(1))
- ->method('getSystemValue')
- ->with('backgroundjobs_mode')
- ->will($this->returnValue('ajax'));
-
$this->connection->expects($this->exactly(1))
->method('supports4ByteText')
->will($this->returnValue(true));
@@ -160,22 +151,19 @@ class StatusServiceTest extends TestCase
*/
public function testGetStatusReportsNon4ByteText()
{
- $this->settings->expects($this->exactly(2))
+ $this->settings->expects($this->exactly(3))
->method('getAppValue')
->withConsecutive(
['news', 'installed_version'],
+ ['core', 'backgroundjobs_mode'],
['news', 'useCronUpdates']
)
->will($this->returnValueMap([
['news', 'installed_version', '', '1.0'],
+ ['core', 'backgroundjobs_mode', '', 'ajax'],
['news', 'useCronUpdates', true, false],
]));
- $this->settings->expects($this->exactly(1))
- ->method('getSystemValue')
- ->with('backgroundjobs_mode')
- ->will($this->returnValue('ajax'));
-
$this->connection->expects($this->exactly(1))
->method('supports4ByteText')
->will($this->returnValue(false));