@@ -80,10 +80,10 @@ public function testPutTriggersEvents()
8080 $ dispatcher = $ this ->getDispatcher ();
8181 $ repository = $ this ->getRepository ($ dispatcher );
8282
83- $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' ]));
83+ $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , ' minutes ' => 99 ]));
8484 $ repository ->put ('foo ' , 'bar ' , 99 );
8585
86- $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , 'tags ' => ['taylor ' ]]));
86+ $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , 'minutes ' => 99 , ' tags ' => ['taylor ' ]]));
8787 $ repository ->tags ('taylor ' )->put ('foo ' , 'bar ' , 99 );
8888 }
8989
@@ -93,11 +93,11 @@ public function testAddTriggersEvents()
9393 $ repository = $ this ->getRepository ($ dispatcher );
9494
9595 $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (CacheMissed::class, ['key ' => 'foo ' ]));
96- $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' ]));
96+ $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , ' minutes ' => 99 ]));
9797 $ this ->assertTrue ($ repository ->add ('foo ' , 'bar ' , 99 ));
9898
9999 $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (CacheMissed::class, ['key ' => 'foo ' , 'tags ' => ['taylor ' ]]));
100- $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , 'tags ' => ['taylor ' ]]));
100+ $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , 'minutes ' => 99 , ' tags ' => ['taylor ' ]]));
101101 $ this ->assertTrue ($ repository ->tags ('taylor ' )->add ('foo ' , 'bar ' , 99 ));
102102 }
103103
@@ -106,10 +106,10 @@ public function testForeverTriggersEvents()
106106 $ dispatcher = $ this ->getDispatcher ();
107107 $ repository = $ this ->getRepository ($ dispatcher );
108108
109- $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' ]));
109+ $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , ' minutes ' => null ]));
110110 $ repository ->forever ('foo ' , 'bar ' );
111111
112- $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , 'tags ' => ['taylor ' ]]));
112+ $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , 'minutes ' => null , ' tags ' => ['taylor ' ]]));
113113 $ repository ->tags ('taylor ' )->forever ('foo ' , 'bar ' );
114114 }
115115
@@ -119,13 +119,13 @@ public function testRememberTriggersEvents()
119119 $ repository = $ this ->getRepository ($ dispatcher );
120120
121121 $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (CacheMissed::class, ['key ' => 'foo ' ]));
122- $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' ]));
122+ $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , ' minutes ' => 99 ]));
123123 $ this ->assertEquals ('bar ' , $ repository ->remember ('foo ' , 99 , function () {
124124 return 'bar ' ;
125125 }));
126126
127127 $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (CacheMissed::class, ['key ' => 'foo ' , 'tags ' => ['taylor ' ]]));
128- $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , 'tags ' => ['taylor ' ]]));
128+ $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , 'minutes ' => 99 , ' tags ' => ['taylor ' ]]));
129129 $ this ->assertEquals ('bar ' , $ repository ->tags ('taylor ' )->remember ('foo ' , 99 , function () {
130130 return 'bar ' ;
131131 }));
@@ -137,13 +137,13 @@ public function testRememberForeverTriggersEvents()
137137 $ repository = $ this ->getRepository ($ dispatcher );
138138
139139 $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (CacheMissed::class, ['key ' => 'foo ' ]));
140- $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' ]));
140+ $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , ' minutes ' => null ]));
141141 $ this ->assertEquals ('bar ' , $ repository ->rememberForever ('foo ' , function () {
142142 return 'bar ' ;
143143 }));
144144
145145 $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (CacheMissed::class, ['key ' => 'foo ' , 'tags ' => ['taylor ' ]]));
146- $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , 'tags ' => ['taylor ' ]]));
146+ $ dispatcher ->shouldReceive ('dispatch ' )->once ()->with ($ this ->assertEventMatches (KeyWritten::class, ['key ' => 'foo ' , 'value ' => 'bar ' , 'minutes ' => null , ' tags ' => ['taylor ' ]]));
147147 $ this ->assertEquals ('bar ' , $ repository ->tags ('taylor ' )->rememberForever ('foo ' , function () {
148148 return 'bar ' ;
149149 }));
0 commit comments