Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Alymosul committed Mar 13, 2018
1 parent 9f3b5e8 commit 4f8bc0e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/Database/DatabaseEloquentModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 4f8bc0e

Please sign in to comment.