Skip to content

Commit ce7164d

Browse files
[Tests] Remove withConsecutive() calls from tests
1 parent b261e20 commit ce7164d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Tests/Security/CheckLdapCredentialsListenerTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,15 @@ public function toArray(): array
146146

147147
$this->ldap
148148
->method('bind')
149-
->withConsecutive(
150-
['elsa', 'test1234A$']
151-
);
149+
->willReturnCallback(function (...$args) {
150+
static $series = [
151+
['elsa', 'test1234A$'],
152+
['', 's3cr3t'],
153+
];
154+
155+
$this->assertSame(array_shift($series), $args);
156+
})
157+
;
152158
$this->ldap->expects($this->any())->method('escape')->with('Wouter', '', LdapInterface::ESCAPE_FILTER)->willReturn('wouter');
153159
$this->ldap->expects($this->once())->method('query')->with('{user_identifier}', 'wouter_test')->willReturn($query);
154160

0 commit comments

Comments
 (0)