Various tweaks 4.3
This commit is contained in:
parent
acca7ad939
commit
7596f99a12
@ -140,7 +140,7 @@ class QuestionTest extends TestCase
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
['Potato'],
|
['Potato'],
|
||||||
[new \stdclass()],
|
[new \stdClass()],
|
||||||
[false],
|
[false],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ EOF
|
|||||||
|
|
||||||
$count = 0;
|
$count = 0;
|
||||||
try {
|
try {
|
||||||
$worker->run([], function (?Envelope $envelope) use ($worker, $io, &$count) {
|
$worker->run([], function (?Envelope $envelope) use ($worker, &$count) {
|
||||||
++$count;
|
++$count;
|
||||||
if (null === $envelope) {
|
if (null === $envelope) {
|
||||||
$worker->stop();
|
$worker->stop();
|
||||||
|
@ -378,7 +378,7 @@ class WorkerTest extends TestCase
|
|||||||
$worker = new Worker([$receiver], $bus);
|
$worker = new Worker([$receiver], $bus);
|
||||||
$workerWithDecorator = new StopWhenMessageCountIsExceededWorker($worker, 2);
|
$workerWithDecorator = new StopWhenMessageCountIsExceededWorker($worker, 2);
|
||||||
$processedEnvelopes = [];
|
$processedEnvelopes = [];
|
||||||
$workerWithDecorator->run([], function (?Envelope $envelope) use ($worker, &$processedEnvelopes) {
|
$workerWithDecorator->run([], function (?Envelope $envelope) use (&$processedEnvelopes) {
|
||||||
if (null !== $envelope) {
|
if (null !== $envelope) {
|
||||||
$processedEnvelopes[] = $envelope;
|
$processedEnvelopes[] = $envelope;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\Security\Http\Firewall;
|
namespace Symfony\Component\Security\Http\Firewall;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
||||||
use Symfony\Component\HttpKernel\Event\RequestEvent;
|
use Symfony\Component\HttpKernel\Event\RequestEvent;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class SwitchUserListenerTest extends TestCase
|
|||||||
public function testExitUserBasedOnSwitchUserRoleUpdatesToken()
|
public function testExitUserBasedOnSwitchUserRoleUpdatesToken()
|
||||||
{
|
{
|
||||||
$originalToken = new UsernamePasswordToken('username', '', 'key', []);
|
$originalToken = new UsernamePasswordToken('username', '', 'key', []);
|
||||||
$this->tokenStorage->setToken(new UsernamePasswordToken('username', '', 'key', [new SwitchUserRole('ROLE_PREVIOUS', $originalToken, false)], $originalToken));
|
$this->tokenStorage->setToken(new UsernamePasswordToken('username', '', 'key', [new SwitchUserRole('ROLE_PREVIOUS', $originalToken, false)]));
|
||||||
|
|
||||||
$this->request->query->set('_switch_user', SwitchUserListener::EXIT_VALUE);
|
$this->request->query->set('_switch_user', SwitchUserListener::EXIT_VALUE);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user