Skip to content

Commit 82fbce1

Browse files
committed
stop using the deprecated at() PHPUnit matcher
1 parent 0e3aaed commit 82fbce1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Tests/Security/CheckLdapCredentialsListenerTest.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ public function testQueryForDn()
152152
$query = $this->getMockBuilder(QueryInterface::class)->getMock();
153153
$query->expects($this->once())->method('execute')->willReturn($collection);
154154

155-
$this->ldap->expects($this->at(0))->method('bind')->with('elsa', 'test1234A$');
155+
$this->ldap
156+
->method('bind')
157+
->withConsecutive(
158+
['elsa', 'test1234A$']
159+
);
156160
$this->ldap->expects($this->any())->method('escape')->with('Wouter', '', LdapInterface::ESCAPE_FILTER)->willReturn('wouter');
157161
$this->ldap->expects($this->once())->method('query')->with('{username}', 'wouter_test')->willReturn($query);
158162

@@ -170,7 +174,11 @@ public function testEmptyQueryResultShouldThrowAnException()
170174
$query = $this->getMockBuilder(QueryInterface::class)->getMock();
171175
$query->expects($this->once())->method('execute')->willReturn($collection);
172176

173-
$this->ldap->expects($this->at(0))->method('bind')->with('elsa', 'test1234A$');
177+
$this->ldap
178+
->method('bind')
179+
->withConsecutive(
180+
['elsa', 'test1234A$']
181+
);
174182
$this->ldap->expects($this->once())->method('query')->willReturn($query);
175183

176184
$listener = $this->createListener();

0 commit comments

Comments
 (0)