diff options
Diffstat (limited to 'tests/Unit/Service')
-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)); |