Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7abffb1

Browse filesBrowse files
committed
change tests
1 parent a892246 commit 7abffb1
Copy full SHA for 7abffb1

File tree

2 files changed

+11
-11
lines changed
Filter options

2 files changed

+11
-11
lines changed

‎src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerWithVoteObjectTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerWithVoteObjectTest.php
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ public static function provideObjectsAndLogs(): \Generator
7474
['ATTRIBUTE_1'],
7575
null,
7676
[
77-
[$voter1, VoterInterface::ACCESS_GRANTED],
78-
[$voter2, VoterInterface::ACCESS_GRANTED],
77+
[$voter1, new Vote(VoterInterface::ACCESS_GRANTED)],
78+
[$voter2, new Vote(VoterInterface::ACCESS_GRANTED)],
7979
],
8080
$result,
8181
];
@@ -85,15 +85,15 @@ public static function provideObjectsAndLogs(): \Generator
8585
'object' => true,
8686
'result' => $result = new AccessDecision(VoterInterface::ACCESS_DENIED),
8787
'voterDetails' => [
88-
['voter' => $voter1, 'attributes' => ['ATTRIBUTE_1', 'ATTRIBUTE_2'], 'vote' => new Vote(VoterInterface::ACCESS_ABSTAIN)],
88+
['voter' => $voter1, 'attributes' => ['ATTRIBUTE_1', 'ATTRIBUTE_2'], 'vote' => VoterInterface::ACCESS_ABSTAIN],
8989
['voter' => $voter2, 'attributes' => ['ATTRIBUTE_1', 'ATTRIBUTE_2'], 'vote' => new Vote(VoterInterface::ACCESS_GRANTED)],
9090
],
9191
]],
9292
['ATTRIBUTE_1', 'ATTRIBUTE_2'],
9393
true,
9494
[
9595
[$voter1, VoterInterface::ACCESS_ABSTAIN],
96-
[$voter2, VoterInterface::ACCESS_GRANTED],
96+
[$voter2, new Vote(VoterInterface::ACCESS_GRANTED)],
9797
],
9898
$result,
9999
];
@@ -110,8 +110,8 @@ public static function provideObjectsAndLogs(): \Generator
110110
[null],
111111
'jolie string',
112112
[
113-
[$voter1, VoterInterface::ACCESS_ABSTAIN],
114-
[$voter2, VoterInterface::ACCESS_DENIED],
113+
[$voter1, new Vote(VoterInterface::ACCESS_ABSTAIN)],
114+
[$voter2, new Vote(VoterInterface::ACCESS_DENIED)],
115115
],
116116
$result,
117117
];
@@ -152,8 +152,8 @@ public static function provideObjectsAndLogs(): \Generator
152152
['ATTRIBUTE_2'],
153153
$x,
154154
[
155-
[$voter1, VoterInterface::ACCESS_ABSTAIN],
156-
[$voter2, VoterInterface::ACCESS_ABSTAIN],
155+
[$voter1, new Vote(VoterInterface::ACCESS_ABSTAIN)],
156+
[$voter2, new Vote(VoterInterface::ACCESS_ABSTAIN)],
157157
],
158158
$result,
159159
];
@@ -170,8 +170,8 @@ public static function provideObjectsAndLogs(): \Generator
170170
[12.13],
171171
new \stdClass(),
172172
[
173-
[$voter1, VoterInterface::ACCESS_DENIED],
174-
[$voter2, VoterInterface::ACCESS_DENIED],
173+
[$voter1, new Vote(VoterInterface::ACCESS_DENIED)],
174+
[$voter2, new Vote(VoterInterface::ACCESS_DENIED)],
175175
],
176176
$result,
177177
];

‎src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public function testSwitchUserAlreadySwitched($accessDecisionManager, string $de
220220
$this->request->query->set('_switch_user', 'kuba');
221221

222222
$targetsUser = $this->callback(fn ($user) => 'kuba' === $user->getUserIdentifier());
223-
$this->accessDecisionManager->expects($this->once())
223+
$accessDecisionManager->expects($this->once())
224224
->method($decideFunction)->with(self::callback(function (TokenInterface $token) use ($originalToken, $tokenStorage) {
225225
// the token storage should also contain the original token for voters depending on it
226226
return $token === $originalToken && $tokenStorage->getToken() === $originalToken;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.