diff options
Diffstat (limited to 'apps/user_ldap/tests/Jobs/SyncTest.php')
-rw-r--r-- | apps/user_ldap/tests/Jobs/SyncTest.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/apps/user_ldap/tests/Jobs/SyncTest.php b/apps/user_ldap/tests/Jobs/SyncTest.php index 1cdbefb289c..e79fa58e019 100644 --- a/apps/user_ldap/tests/Jobs/SyncTest.php +++ b/apps/user_ldap/tests/Jobs/SyncTest.php @@ -175,7 +175,7 @@ class SyncTest extends TestCase { $connection->expects($this->any()) ->method('__get') ->willReturnCallback(function ($key) use ($pagingSize) { - if($key === 'ldapPagingSize') { + if ($key === 'ldapPagingSize') { return $pagingSize; } return null; @@ -221,7 +221,7 @@ class SyncTest extends TestCase { ->with(true) ->willReturn($prefixes); - if(is_array($expectedCycle)) { + if (is_array($expectedCycle)) { $this->config->expects($this->exactly(2)) ->method('setAppValue') ->withConsecutive( @@ -236,7 +236,7 @@ class SyncTest extends TestCase { $this->sync->setArgument($this->arguments); $nextCycle = $this->sync->determineNextCycle($cycleData); - if($expectedCycle === null) { + if ($expectedCycle === null) { $this->assertNull($nextCycle); } else { $this->assertSame($expectedCycle['prefix'], $nextCycle['prefix']); @@ -295,23 +295,23 @@ class SyncTest extends TestCase { $this->config->expects($this->any()) ->method('getAppValue') ->willReturnCallback(function ($app, $key, $default) use ($runData) { - if($app === 'core' && $key === 'backgroundjobs_mode') { + if ($app === 'core' && $key === 'backgroundjobs_mode') { return 'cron'; } - if($app = 'user_ldap') { + if ($app = 'user_ldap') { // for getCycle() - if($key === 'background_sync_prefix') { + if ($key === 'background_sync_prefix') { return $runData['scheduledCycle']['prefix']; } - if($key === 'background_sync_offset') { + if ($key === 'background_sync_offset') { return $runData['scheduledCycle']['offset']; } // for qualifiesToRun() - if($key === $runData['scheduledCycle']['prefix'] . '_lastChange') { + if ($key === $runData['scheduledCycle']['prefix'] . '_lastChange') { return time() - 60*40; } // for getMinPagingSize - if($key === $runData['scheduledCycle']['prefix'] . 'ldap_paging_size') { + if ($key === $runData['scheduledCycle']['prefix'] . 'ldap_paging_size') { return $runData['pagingSize']; } } @@ -342,7 +342,7 @@ class SyncTest extends TestCase { $connection->expects($this->any()) ->method('__get') ->willReturnCallback(function ($key) use ($runData) { - if($key === 'ldapPagingSize') { + if ($key === 'ldapPagingSize') { return $runData['pagingSize']; } return null; @@ -367,5 +367,4 @@ class SyncTest extends TestCase { $this->sync->run($this->arguments); } - } |