33namespace RyanChandler \BladeCacheDirective \Tests ;
44
55use Artisan ;
6- use Illuminate \Support \Facades \Cache ;
76
87class CacheTest extends TestCase
98{
10-
119 protected $ first_value ;
1210 protected $ second_value ;
1311 protected $ third_value ;
@@ -24,21 +22,21 @@ public function setUp(): void
2422 /** @test */
2523 public function the_cache_directive_will_render_the_same_view_before_ttl_expired ()
2624 {
27- $ time = $ this ->first_value ;
25+ $ time = $ this ->first_value ;
2826 $ this ->assertEquals ($ this ->first_value ->format ('Y-m-d H:i:s ' ), $ this ->renderView ('cache ' , compact ('time ' )));
2927
30- $ time = $ this ->second_value ;
28+ $ time = $ this ->second_value ;
3129 $ this ->assertEquals ($ this ->first_value ->format ('Y-m-d H:i:s ' ), $ this ->renderView ('cache ' , compact ('time ' )));
3230 }
3331
3432 /** @test */
3533 public function the_cache_directive_will_render_other_view_after_ttl_expired ()
3634 {
37- $ time = $ this ->first_value ;
35+ $ time = $ this ->first_value ;
3836 $ this ->assertEquals ($ this ->first_value ->format ('Y-m-d H:i:s ' ), $ this ->renderView ('cache ' , compact ('time ' )));
3937
4038 sleep (2 );
41- $ time = $ this ->second_value ;
39+ $ time = $ this ->second_value ;
4240 $ this ->assertNotEquals ($ this ->first_value , $ this ->second_value );
4341 $ this ->assertEquals ($ this ->second_value ->format ('Y-m-d H:i:s ' ), $ this ->renderView ('cache ' , compact ('time ' )));
4442 }
@@ -47,7 +45,7 @@ protected function renderView($view, $parameters)
4745 {
4846 Artisan::call ('view:clear ' );
4947
50- if (is_string ($ view )) {
48+ if (is_string ($ view )) {
5149 $ view = view ($ view )->with ($ parameters );
5250 }
5351
0 commit comments