diff options
Diffstat (limited to 'apps/user_ldap/tests/Migration')
-rw-r--r-- | apps/user_ldap/tests/Migration/UUIDFixInsertTest.php | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php index b13efa14e5c..49431ec0d9a 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php @@ -159,18 +159,15 @@ class UUIDFixInsertTest extends TestCase { ->with(0, 50) ->willReturn($groupBatches[0]); - $this->jobList->expects($this->at(0)) + $this->jobList->expects($this->exactly(5)) ->method('add') - ->willThrowException(new \InvalidArgumentException('Background job arguments can\'t exceed 4000 etc')); - $this->jobList->expects($this->at(1)) - ->method('add') - ->willThrowException(new \InvalidArgumentException('Background job arguments can\'t exceed 4000 etc')); - $this->jobList->expects($this->at(2)) - ->method('add'); - $this->jobList->expects($this->at(3)) - ->method('add'); - $this->jobList->expects($this->at(4)) - ->method('add'); + ->willReturnOnConsecutiveCalls( + $this->throwException(new \InvalidArgumentException('Background job arguments can\'t exceed 4000 etc')), + $this->throwException(new \InvalidArgumentException('Background job arguments can\'t exceed 4000 etc')), + null, + null, + null, + ); /** @var IOutput $out */ $out = $this->createMock(IOutput::class); |