diff --git a/src/Illuminate/Support/Testing/Fakes/EventFake.php b/src/Illuminate/Support/Testing/Fakes/EventFake.php index b949e0661b13..edb5928dea1b 100644 --- a/src/Illuminate/Support/Testing/Fakes/EventFake.php +++ b/src/Illuminate/Support/Testing/Fakes/EventFake.php @@ -234,7 +234,7 @@ protected function shouldFakeEvent($eventName, $payload) ? $event($eventName, $payload) : $event === $eventName; }) - ->isEmpty(); + ->isNotEmpty(); } /** diff --git a/tests/Support/SupportTestingEventFakeTest.php b/tests/Support/SupportTestingEventFakeTest.php index 75d30323724e..78ce91c06abc 100644 --- a/tests/Support/SupportTestingEventFakeTest.php +++ b/tests/Support/SupportTestingEventFakeTest.php @@ -78,7 +78,7 @@ public function testAssertNotDispatched() public function testAssertDispatchedWithIgnore() { $dispatcher = m::mock(Dispatcher::class); - $dispatcher->shouldReceive('dispatch')->twice(); + $dispatcher->shouldReceive('dispatch')->once(); $fake = new EventFake($dispatcher, [ 'Foo', @@ -91,9 +91,9 @@ function ($event, $payload) { $fake->dispatch('Bar', ['id' => 1]); $fake->dispatch('Baz'); - $fake->assertNotDispatched('Foo'); - $fake->assertNotDispatched('Bar'); - $fake->assertDispatched('Baz'); + $fake->assertDispatched('Foo'); + $fake->assertDispatched('Bar'); + $fake->assertNotDispatched('Baz'); } }