Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9004e35

Browse files
Merge branch '5.4' into 6.0
* 5.4: [Security/Core] fix test
2 parents de2dd61 + c0e7f09 commit 9004e35

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/Symfony/Component/Security/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,12 @@ public function testQueryForDn()
105105
{
106106
$userProvider = $this->createMock(UserProviderInterface::class);
107107

108-
$collection = new \ArrayIterator([new Entry('')]);
108+
$collection = new class([new Entry('')]) extends \ArrayObject implements CollectionInterface {
109+
public function toArray(): array
110+
{
111+
return $this->getArrayCopy();
112+
}
113+
};
109114

110115
$query = $this->createMock(QueryInterface::class);
111116
$query
@@ -146,7 +151,12 @@ public function testQueryWithUserForDn()
146151
{
147152
$userProvider = $this->createMock(UserProviderInterface::class);
148153

149-
$collection = new \ArrayIterator([new Entry('')]);
154+
$collection = new class([new Entry('')]) extends \ArrayObject implements CollectionInterface {
155+
public function toArray(): array
156+
{
157+
return $this->getArrayCopy();
158+
}
159+
};
150160

151161
$query = $this->createMock(QueryInterface::class);
152162
$query

0 commit comments

Comments
 (0)