From 4f8bc0e0391376f6b059f9b03421c896360a3d7f Mon Sep 17 00:00:00 2001 From: Alymosul Date: Tue, 13 Mar 2018 13:22:02 +0200 Subject: [PATCH] formatting --- tests/Database/DatabaseEloquentModelTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Database/DatabaseEloquentModelTest.php b/tests/Database/DatabaseEloquentModelTest.php index 5e4c8c64e5bd..b16d74df08f2 100755 --- a/tests/Database/DatabaseEloquentModelTest.php +++ b/tests/Database/DatabaseEloquentModelTest.php @@ -1286,13 +1286,17 @@ public function testModelObserversCanBeAttachedToModelsThroughCallingObserveMeth EloquentModelStub::setEventDispatcher($events = m::mock('Illuminate\Contracts\Events\Dispatcher')); $events->shouldReceive('listen')->once()->with('eloquent.creating: Illuminate\Tests\Database\EloquentModelStub', 'Illuminate\Tests\Database\EloquentTestObserverStub@creating'); $events->shouldReceive('listen')->once()->with('eloquent.saved: Illuminate\Tests\Database\EloquentModelStub', 'Illuminate\Tests\Database\EloquentTestObserverStub@saved'); + $events->shouldReceive('listen')->once()->with('eloquent.creating: Illuminate\Tests\Database\EloquentModelStub', 'Illuminate\Tests\Database\EloquentTestAnotherObserverStub@creating'); $events->shouldReceive('listen')->once()->with('eloquent.saved: Illuminate\Tests\Database\EloquentModelStub', 'Illuminate\Tests\Database\EloquentTestAnotherObserverStub@saved'); + $events->shouldReceive('forget'); + EloquentModelStub::observe([ 'Illuminate\Tests\Database\EloquentTestObserverStub', 'Illuminate\Tests\Database\EloquentTestAnotherObserverStub', ]); + EloquentModelStub::flushEventListeners(); }