Skip to content

Commit 2442690

Browse files
committed
Use Illuminate\Events\Dispatcher instead of contract
Laravel dispatcher should be either Illuminate\Contracts\Events\Dispatcher or Illuminate\Events\Dispatcher, however only the latter has fire() method, which in turn just a wrapper for dispatch() Using fire() inplace with contract tests are failing with exceptions: 1. Tmdb\Laravel\Adapters\Tests\EventDispatcherTestLaravel5::it_dispatches_events_through_both_laravel_and_symfony Prophecy\Exception\Doubler\MethodNotFoundException: Method `Double\Dispatcher\P25::fire()` is not defined. 2. Tmdb\Laravel\Adapters\Tests\EventDispatcherTestLaravel5::it_returns_the_event_returned_by_the_symfony_dispatcher Prophecy\Exception\Doubler\MethodNotFoundException: Method `Double\Dispatcher\P27::fire()` not found.
1 parent 54dfc9b commit 2442690

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Adapters/EventDispatcherTestLaravel5.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class EventDispatcherTestLaravel5 extends AbstractEventDispatcherTest
1212
{
1313
protected function createEventDispatcher()
1414
{
15-
$this->laravel = $this->prophesize('Illuminate\Contracts\Events\Dispatcher');
15+
$this->laravel = $this->prophesize('Illuminate\Events\Dispatcher');
1616
$this->symfony = $this->prophesize('Symfony\Component\EventDispatcher\EventDispatcher');
1717

1818
return new AdapterDispatcher(

0 commit comments

Comments
 (0)