@@ -27,7 +27,7 @@ public function tearDown(): void
27
27
public function test_event_cart_created ()
28
28
{
29
29
$ events = m::mock ('Illuminate\Contracts\Events\Dispatcher ' );
30
- $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ));
30
+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ), true );
31
31
32
32
$ cart = new Cart (
33
33
new SessionMock (),
@@ -43,9 +43,9 @@ public function test_event_cart_created()
43
43
public function test_event_cart_adding ()
44
44
{
45
45
$ events = m::mock ('Illuminate\Events\Dispatcher ' );
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 ' ));
46
+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ), true );
47
+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ), true );
48
+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ), true );
49
49
50
50
$ cart = new Cart (
51
51
new SessionMock (),
@@ -63,9 +63,9 @@ public function test_event_cart_adding()
63
63
public function test_event_cart_adding_multiple_times ()
64
64
{
65
65
$ events = m::mock ('Illuminate\Events\Dispatcher ' );
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 ' ));
66
+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ), true );
67
+ $ events ->shouldReceive ('dispatch ' )->times (2 )->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ), true );
68
+ $ events ->shouldReceive ('dispatch ' )->times (2 )->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ), true );
69
69
70
70
$ cart = new Cart (
71
71
new SessionMock (),
@@ -84,9 +84,9 @@ public function test_event_cart_adding_multiple_times()
84
84
public function test_event_cart_adding_multiple_times_scenario_two ()
85
85
{
86
86
$ events = m::mock ('Illuminate\Events\Dispatcher ' );
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 ' ));
87
+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ), true );
88
+ $ events ->shouldReceive ('dispatch ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ), true );
89
+ $ events ->shouldReceive ('dispatch ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ), true );
90
90
91
91
$ items = array (
92
92
array (
@@ -128,11 +128,11 @@ public function test_event_cart_adding_multiple_times_scenario_two()
128
128
public function test_event_cart_remove_item ()
129
129
{
130
130
$ events = m::mock ('Illuminate\Events\Dispatcher ' );
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 ' ));
131
+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ), true );
132
+ $ events ->shouldReceive ('dispatch ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ), true );
133
+ $ events ->shouldReceive ('dispatch ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ), true );
134
+ $ events ->shouldReceive ('dispatch ' )->times (1 )->with (self ::CART_INSTANCE_NAME .'.removing ' , m::type ('array ' ), true );
135
+ $ events ->shouldReceive ('dispatch ' )->times (1 )->with (self ::CART_INSTANCE_NAME .'.removed ' , m::type ('array ' ), true );
136
136
137
137
$ items = array (
138
138
array (
@@ -176,11 +176,11 @@ public function test_event_cart_remove_item()
176
176
public function test_event_cart_clear ()
177
177
{
178
178
$ events = m::mock ('Illuminate\Events\Dispatcher ' );
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 ' ));
179
+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.created ' , m::type ('array ' ), true );
180
+ $ events ->shouldReceive ('dispatch ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.adding ' , m::type ('array ' ), true );
181
+ $ events ->shouldReceive ('dispatch ' )->times (3 )->with (self ::CART_INSTANCE_NAME .'.added ' , m::type ('array ' ), true );
182
+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.clearing ' , m::type ('array ' ), true );
183
+ $ events ->shouldReceive ('dispatch ' )->once ()->with (self ::CART_INSTANCE_NAME .'.cleared ' , m::type ('array ' ), true );
184
184
185
185
$ items = array (
186
186
array (
0 commit comments