diff options
author | anoy <anoymouserver+github@mailbox.org> | 2020-10-02 14:34:46 +0200 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2020-10-02 15:43:06 +0200 |
commit | 4fffe42eb9064373cbdedd90f1c4dc3e9fa82c29 (patch) | |
tree | 7fe97edb91175a80f67b3ad4ce60379933a015f0 /tests/Unit | |
parent | 9e84bf054e63af3844c39919f3185c19c26ed014 (diff) |
fix incorrect cron recommendation
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
Diffstat (limited to 'tests/Unit')
-rw-r--r-- | tests/Unit/Service/StatusServiceTest.php | 36 |
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)); |