@@ -21,7 +21,7 @@ public function testEmbedsManySave()
21
21
$ address = new Address (['city ' => 'London ' ]);
22
22
23
23
$ address ->setEventDispatcher ($ events = Mockery::mock ('Illuminate\Events\Dispatcher ' ));
24
- $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), anything ());
24
+ $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), Mockery:: any ());
25
25
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.saving: ' . get_class ($ address ), $ address )->andReturn (true );
26
26
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.creating: ' . get_class ($ address ), $ address )->andReturn (true );
27
27
$ events ->shouldReceive ('fire ' )->once ()->with ('eloquent.created: ' . get_class ($ address ), $ address );
@@ -47,7 +47,7 @@ public function testEmbedsManySave()
47
47
$ this ->assertEquals (['London ' , 'Paris ' ], $ user ->addresses ->pluck ('city ' )->all ());
48
48
49
49
$ address ->setEventDispatcher ($ events = Mockery::mock ('Illuminate\Events\Dispatcher ' ));
50
- $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), anything ());
50
+ $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), Mockery:: any ());
51
51
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.saving: ' . get_class ($ address ), $ address )->andReturn (true );
52
52
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.updating: ' . get_class ($ address ), $ address )->andReturn (true );
53
53
$ events ->shouldReceive ('fire ' )->once ()->with ('eloquent.updated: ' . get_class ($ address ), $ address );
@@ -213,7 +213,7 @@ public function testEmbedsManyDestroy()
213
213
$ address = $ user ->addresses ->first ();
214
214
215
215
$ address ->setEventDispatcher ($ events = Mockery::mock ('Illuminate\Events\Dispatcher ' ));
216
- $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), anything ());
216
+ $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), Mockery:: any ());
217
217
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.deleting: ' . get_class ($ address ), Mockery::type ('Address ' ))->andReturn (true );
218
218
$ events ->shouldReceive ('fire ' )->once ()->with ('eloquent.deleted: ' . get_class ($ address ), Mockery::type ('Address ' ));
219
219
@@ -252,7 +252,7 @@ public function testEmbedsManyDelete()
252
252
$ address = $ user ->addresses ->first ();
253
253
254
254
$ address ->setEventDispatcher ($ events = Mockery::mock ('Illuminate\Events\Dispatcher ' ));
255
- $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), anything ());
255
+ $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), Mockery:: any ());
256
256
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.deleting: ' . get_class ($ address ), Mockery::type ('Address ' ))->andReturn (true );
257
257
$ events ->shouldReceive ('fire ' )->once ()->with ('eloquent.deleted: ' . get_class ($ address ), Mockery::type ('Address ' ));
258
258
@@ -301,7 +301,7 @@ public function testEmbedsManyCreatingEventReturnsFalse()
301
301
$ address = new Address (['city ' => 'London ' ]);
302
302
303
303
$ address ->setEventDispatcher ($ events = Mockery::mock ('Illuminate\Events\Dispatcher ' ));
304
- $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), anything ());
304
+ $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), Mockery:: any ());
305
305
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.saving: ' . get_class ($ address ), $ address )->andReturn (true );
306
306
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.creating: ' . get_class ($ address ), $ address )->andReturn (false );
307
307
@@ -316,7 +316,7 @@ public function testEmbedsManySavingEventReturnsFalse()
316
316
$ address ->exists = true ;
317
317
318
318
$ address ->setEventDispatcher ($ events = Mockery::mock ('Illuminate\Events\Dispatcher ' ));
319
- $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), anything ());
319
+ $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), Mockery:: any ());
320
320
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.saving: ' . get_class ($ address ), $ address )->andReturn (false );
321
321
322
322
$ this ->assertFalse ($ user ->addresses ()->save ($ address ));
@@ -330,7 +330,7 @@ public function testEmbedsManyUpdatingEventReturnsFalse()
330
330
$ user ->addresses ()->save ($ address );
331
331
332
332
$ address ->setEventDispatcher ($ events = Mockery::mock ('Illuminate\Events\Dispatcher ' ));
333
- $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), anything ());
333
+ $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), Mockery:: any ());
334
334
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.saving: ' . get_class ($ address ), $ address )->andReturn (true );
335
335
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.updating: ' . get_class ($ address ), $ address )->andReturn (false );
336
336
@@ -348,7 +348,7 @@ public function testEmbedsManyDeletingEventReturnsFalse()
348
348
$ address = $ user ->addresses ->first ();
349
349
350
350
$ address ->setEventDispatcher ($ events = Mockery::mock ('Illuminate\Events\Dispatcher ' ));
351
- $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), anything ());
351
+ $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ address ), Mockery:: any ());
352
352
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.deleting: ' . get_class ($ address ), Mockery::mustBe ($ address ))->andReturn (false );
353
353
354
354
$ this ->assertEquals (0 , $ user ->addresses ()->destroy ($ address ));
@@ -452,7 +452,7 @@ public function testEmbedsOne()
452
452
$ father = new User (['name ' => 'Mark Doe ' ]);
453
453
454
454
$ father ->setEventDispatcher ($ events = Mockery::mock ('Illuminate\Events\Dispatcher ' ));
455
- $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ father ), anything ());
455
+ $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ father ), Mockery:: any ());
456
456
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.saving: ' . get_class ($ father ), $ father )->andReturn (true );
457
457
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.creating: ' . get_class ($ father ), $ father )->andReturn (true );
458
458
$ events ->shouldReceive ('fire ' )->once ()->with ('eloquent.created: ' . get_class ($ father ), $ father );
@@ -472,7 +472,7 @@ public function testEmbedsOne()
472
472
$ this ->assertInstanceOf ('MongoDB\BSON\ObjectID ' , $ raw ['_id ' ]);
473
473
474
474
$ father ->setEventDispatcher ($ events = Mockery::mock ('Illuminate\Events\Dispatcher ' ));
475
- $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ father ), anything ());
475
+ $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ father ), Mockery:: any ());
476
476
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.saving: ' . get_class ($ father ), $ father )->andReturn (true );
477
477
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.updating: ' . get_class ($ father ), $ father )->andReturn (true );
478
478
$ events ->shouldReceive ('fire ' )->once ()->with ('eloquent.updated: ' . get_class ($ father ), $ father );
@@ -488,7 +488,7 @@ public function testEmbedsOne()
488
488
$ father = new User (['name ' => 'Jim Doe ' ]);
489
489
490
490
$ father ->setEventDispatcher ($ events = Mockery::mock ('Illuminate\Events\Dispatcher ' ));
491
- $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ father ), anything ());
491
+ $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ father ), Mockery:: any ());
492
492
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.saving: ' . get_class ($ father ), $ father )->andReturn (true );
493
493
$ events ->shouldReceive ('until ' )->once ()->with ('eloquent.creating: ' . get_class ($ father ), $ father )->andReturn (true );
494
494
$ events ->shouldReceive ('fire ' )->once ()->with ('eloquent.created: ' . get_class ($ father ), $ father );
@@ -507,7 +507,7 @@ public function testEmbedsOneAssociate()
507
507
$ father = new User (['name ' => 'Mark Doe ' ]);
508
508
509
509
$ father ->setEventDispatcher ($ events = Mockery::mock ('Illuminate\Events\Dispatcher ' ));
510
- $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ father ), anything ());
510
+ $ events ->shouldReceive ('fire ' )->with ('eloquent.retrieved: ' . get_class ($ father ), Mockery:: any ());
511
511
$ events ->shouldReceive ('until ' )->times (0 )->with ('eloquent.saving: ' . get_class ($ father ), $ father );
512
512
513
513
$ father = $ user ->father ()->associate ($ father );
0 commit comments