minor #34303 [Messenger] Fixed bad event dispatcher mocks (derrabus)
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] Fixed bad event dispatcher mocks
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
`EventDispatcherInterface::dispatch()` must return the passed event object. This PR fixes two mocks that violated this contract.
Commits
-------
103930039b
[Messenger] Fixed bad event dispatcher mocks.
This commit is contained in:
commit
fd7c676172
@ -122,6 +122,8 @@ class WorkerTest extends TestCase
|
|||||||
if ($event instanceof WorkerRunningEvent) {
|
if ($event instanceof WorkerRunningEvent) {
|
||||||
$event->getWorker()->stop();
|
$event->getWorker()->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $event;
|
||||||
});
|
});
|
||||||
|
|
||||||
$worker = new Worker([$receiver], $bus, $eventDispatcher);
|
$worker = new Worker([$receiver], $bus, $eventDispatcher);
|
||||||
@ -151,6 +153,8 @@ class WorkerTest extends TestCase
|
|||||||
if ($event instanceof WorkerRunningEvent) {
|
if ($event instanceof WorkerRunningEvent) {
|
||||||
$event->getWorker()->stop();
|
$event->getWorker()->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $event;
|
||||||
});
|
});
|
||||||
|
|
||||||
$worker = new Worker([$receiver], $bus, $eventDispatcher);
|
$worker = new Worker([$receiver], $bus, $eventDispatcher);
|
||||||
|
Reference in New Issue
Block a user