Skip to content

Commit b261e20

Browse files
Merge branch '5.4' into 6.2
* 5.4: [Tests] Remove occurrences of `withConsecutive()` Fix support binary values in parameters. [Dotenv] Improve Dotenv::usePutenv phpdoc
2 parents ea130aa + e3ed865 commit b261e20

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

Tests/Security/CheckLdapCredentialsListenerTest.php

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,15 @@ public function toArray(): array
178178

179179
$this->ldap
180180
->method('bind')
181-
->withConsecutive(
182-
['elsa', 'test1234A$']
183-
);
181+
->willReturnCallback(function (...$args) {
182+
static $series = [
183+
['elsa', 'test1234A$'],
184+
['', 's3cr3t'],
185+
];
186+
187+
$this->assertSame(array_shift($series), $args);
188+
})
189+
;
184190
$this->ldap->expects($this->any())->method('escape')->with('Wouter', '', LdapInterface::ESCAPE_FILTER)->willReturn('wouter');
185191
$this->ldap->expects($this->once())->method('query')->with('{user_identifier}', 'wouter_test')->willReturn($query);
186192

@@ -200,9 +206,15 @@ public function testEmptyQueryResultShouldThrowAnException()
200206

201207
$this->ldap
202208
->method('bind')
203-
->withConsecutive(
204-
['elsa', 'test1234A$']
205-
);
209+
->willReturnCallback(function (...$args) {
210+
static $series = [
211+
['elsa', 'test1234A$'],
212+
['', 's3cr3t'],
213+
];
214+
215+
$this->assertSame(array_shift($series), $args);
216+
})
217+
;
206218
$this->ldap->method('escape')->willReturnArgument(0);
207219
$this->ldap->expects($this->once())->method('query')->willReturn($query);
208220

0 commit comments

Comments
 (0)