Commit 21d973ad authored by duxet's avatar duxet

Fix test

parent f9a7d342
...@@ -521,8 +521,9 @@ class RelationsTest extends PHPUnit_Framework_TestCase { ...@@ -521,8 +521,9 @@ class RelationsTest extends PHPUnit_Framework_TestCase {
public function testEmbedsManyDeletingEventReturnsFalse() public function testEmbedsManyDeletingEventReturnsFalse()
{ {
$user = User::create(array('name' => 'John Doe')); $user = User::create(array('name' => 'John Doe'));
$address = new Address(array('city' => 'New York')); $user->addresses()->save(new Address(array('city' => 'New York')));
$user->addresses()->save($address);
$address = $user->addresses->first();
$address->setEventDispatcher($events = Mockery::mock('Illuminate\Events\Dispatcher')); $address->setEventDispatcher($events = Mockery::mock('Illuminate\Events\Dispatcher'));
$events->shouldReceive('until')->once()->with('eloquent.deleting: '.get_class($address), Mockery::mustBe($address))->andReturn(false); $events->shouldReceive('until')->once()->with('eloquent.deleting: '.get_class($address), Mockery::mustBe($address))->andReturn(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment