Skip to content

Commit 8d51944

Browse files
Merge branch '6.2' into 6.3
* 6.2: [Tests] Remove `withConsecutive()` calls from tests
2 parents 3e9e062 + ce7164d commit 8d51944

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)