@@ -400,7 +400,7 @@ public function it_can_process_all()
400400 ]);
401401
402402 $ connection = $ this ->newConnectionMock ();
403- $ connection ->shouldReceive ('scan ' )->with ($ params )->andReturn ($ return );
403+ $ connection ->shouldReceive ('scan ' )->with ($ params )->andReturn ($ return )-> once () ;
404404 $ this ->setConnectionResolver ($ connection );
405405
406406 UserA::all ();
@@ -423,7 +423,7 @@ public function it_can_save_new_instance()
423423 ];
424424
425425 $ connection = $ this ->newConnectionMock ();
426- $ connection ->shouldReceive ('putItem ' )->with ($ params );
426+ $ connection ->shouldReceive ('putItem ' )->with ($ params )-> once () ;
427427 $ this ->setConnectionResolver ($ connection );
428428
429429 $ user = new UserA (['partition ' => 'p ' ]);
@@ -448,7 +448,7 @@ public function it_can_static_create_new_instance()
448448 ];
449449
450450 $ connection = $ this ->newConnectionMock ();
451- $ connection ->shouldReceive ('putItem ' )->with ($ params );
451+ $ connection ->shouldReceive ('putItem ' )->with ($ params )-> once () ;
452452 $ this ->setConnectionResolver ($ connection );
453453
454454 UserD::create (['partition ' => 'p ' ]);
@@ -490,7 +490,7 @@ public function it_can_save_existing_instance()
490490 ];
491491
492492 $ connection = $ this ->newConnectionMock ();
493- $ connection ->shouldReceive ('updateItem ' )->with ($ params )->andReturn ($ this ->sampleAwsResultEmpty ());
493+ $ connection ->shouldReceive ('updateItem ' )->with ($ params )->andReturn ($ this ->sampleAwsResultEmpty ())-> once () ;
494494 $ this ->setConnectionResolver ($ connection );
495495
496496 $ user = (new UserA )->newFromBuilder (['partition ' => 'p ' ]);
@@ -526,7 +526,7 @@ public function it_can_delete_existing_instance()
526526 ];
527527
528528 $ connection = $ this ->newConnectionMock ();
529- $ connection ->shouldReceive ('deleteItem ' )->with ($ params );
529+ $ connection ->shouldReceive ('deleteItem ' )->with ($ params )-> once () ;
530530 $ this ->setConnectionResolver ($ connection );
531531
532532 $ user = (new UserA )->newFromBuilder (['partition ' => 'p ' ]);
@@ -575,7 +575,7 @@ public function it_can_call_allowed_builder_method()
575575 'S ' => 'p '
576576 ]
577577 ]
578- ]);
578+ ])-> once () ;
579579 $ this ->setConnectionResolver ($ connection );
580580
581581 UserA::putItem ([
0 commit comments