We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ad421ff + a801d52 commit c141337Copy full SHA for c141337
Tests/Authorization/AccessDecisionManagerTest.php
@@ -118,8 +118,17 @@ public function testCacheableVotersWithMultipleAttributes()
118
$voter
119
->expects($this->exactly(2))
120
->method('supportsAttribute')
121
- ->withConsecutive(['foo'], ['bar'])
122
- ->willReturnOnConsecutiveCalls(false, true);
+ ->willReturnCallback(function (...$args) {
+ static $series = [
123
+ [['foo'], false],
124
+ [['bar'], true],
125
+ ];
126
+
127
+ [$expectedArgs, $return] = array_shift($series);
128
+ $this->assertSame($expectedArgs, $args);
129
130
+ return $return;
131
+ });
132
133
->expects($this->once())
134
->method('supportsType')
0 commit comments