@@ -27,7 +27,7 @@ public function tearDown()
2727 public function test_event_cart_created ()
2828 {
2929 $ events = m::mock ('Illuminate\Contracts\Events\Dispatcher ' );
30- $ events ->shouldReceive ('fire ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
30+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
3131
3232 $ cart = new Cart (
3333 new SessionMock (),
@@ -43,9 +43,9 @@ public function test_event_cart_created()
4343 public function test_event_cart_adding ()
4444 {
4545 $ events = m::mock ('Illuminate\Events\Dispatcher ' );
46- $ events ->shouldReceive ('fire ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
47- $ events ->shouldReceive ('fire ' )->once ()->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ));
48- $ events ->shouldReceive ('fire ' )->once ()->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ));
46+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
47+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ));
48+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ));
4949
5050 $ cart = new Cart (
5151 new SessionMock (),
@@ -63,9 +63,9 @@ public function test_event_cart_adding()
6363 public function test_event_cart_adding_multiple_times ()
6464 {
6565 $ events = m::mock ('Illuminate\Events\Dispatcher ' );
66- $ events ->shouldReceive ('fire ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
67- $ events ->shouldReceive ('fire ' )->times (2 )->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ));
68- $ events ->shouldReceive ('fire ' )->times (2 )->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ));
66+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
67+ $ events ->shouldReceive ('dispatch ' )->times (2 )->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ));
68+ $ events ->shouldReceive ('dispatch ' )->times (2 )->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ));
6969
7070 $ cart = new Cart (
7171 new SessionMock (),
@@ -84,9 +84,9 @@ public function test_event_cart_adding_multiple_times()
8484 public function test_event_cart_adding_multiple_times_scenario_two ()
8585 {
8686 $ events = m::mock ('Illuminate\Events\Dispatcher ' );
87- $ events ->shouldReceive ('fire ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
88- $ events ->shouldReceive ('fire ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ));
89- $ events ->shouldReceive ('fire ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ));
87+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
88+ $ events ->shouldReceive ('dispatch ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ));
89+ $ events ->shouldReceive ('dispatch ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ));
9090
9191 $ items = array (
9292 array (
@@ -128,11 +128,11 @@ public function test_event_cart_adding_multiple_times_scenario_two()
128128 public function test_event_cart_remove_item ()
129129 {
130130 $ events = m::mock ('Illuminate\Events\Dispatcher ' );
131- $ events ->shouldReceive ('fire ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
132- $ events ->shouldReceive ('fire ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ));
133- $ events ->shouldReceive ('fire ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ));
134- $ events ->shouldReceive ('fire ' )->times (1 )->with (self ::CART_INSTANCE_NAME .'.removing ' , m::type ('array ' ));
135- $ events ->shouldReceive ('fire ' )->times (1 )->with (self ::CART_INSTANCE_NAME .'.removed ' , m::type ('array ' ));
131+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
132+ $ events ->shouldReceive ('dispatch ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ));
133+ $ events ->shouldReceive ('dispatch ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ));
134+ $ events ->shouldReceive ('dispatch ' )->times (1 )->with (self ::CART_INSTANCE_NAME .'.removing ' , m::type ('array ' ));
135+ $ events ->shouldReceive ('dispatch ' )->times (1 )->with (self ::CART_INSTANCE_NAME .'.removed ' , m::type ('array ' ));
136136
137137 $ items = array (
138138 array (
@@ -176,11 +176,11 @@ public function test_event_cart_remove_item()
176176 public function test_event_cart_clear ()
177177 {
178178 $ events = m::mock ('Illuminate\Events\Dispatcher ' );
179- $ events ->shouldReceive ('fire ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
180- $ events ->shouldReceive ('fire ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ));
181- $ events ->shouldReceive ('fire ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ));
182- $ events ->shouldReceive ('fire ' )->once ()->with (self ::CART_INSTANCE_NAME .'.clearing ' , m::type ('array ' ));
183- $ events ->shouldReceive ('fire ' )->once ()->with (self ::CART_INSTANCE_NAME .'.cleared ' , m::type ('array ' ));
179+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
180+ $ events ->shouldReceive ('dispatch ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ));
181+ $ events ->shouldReceive ('dispatch ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ));
182+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.clearing ' , m::type ('array ' ));
183+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.cleared ' , m::type ('array ' ));
184184
185185 $ items = array (
186186 array (
0 commit comments