File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public function fire()
5656
5757 $ driverConfig = $ configure ['aop ' ][$ configure ['default ' ]];
5858 if (isset ($ driverConfig ['cacheDir ' ])) {
59- $ this ->filesystem ->deleteDirectory ($ driverConfig ['cacheDir ' ]);
59+ $ this ->filesystem ->cleanDirectory ($ driverConfig ['cacheDir ' ]);
6060 }
6161 $ this ->info ('aspect/annotation cache clear! ' );
6262 }
Original file line number Diff line number Diff line change @@ -77,7 +77,6 @@ protected function resolveManager()
7777 {
7878 $ annotation = new \Ytake \LaravelAspect \Annotation ;
7979 $ annotation ->registerAspectAnnotations ();
80- /** @var \Ytake\LaravelAop\GoAspect $aspect */
8180 $ aspect = $ this ->manager ->driver ('go ' );
8281 $ aspect ->register ();
8382 }
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ public function testCacheClearFile()
3939 $ configure = $ this ->app ['config ' ]->get ('ytake-laravel-aop ' );
4040 $ driverConfig = $ configure ['aop ' ][$ configure ['default ' ]];
4141 if (isset ($ driverConfig ['cacheDir ' ])) {
42- $ this ->assertFalse ($ this ->app ['filesystem ' ]->exists ($ driverConfig ['cacheDir ' ]));
42+ $ files = $ this ->app ['filesystem ' ]->files ($ driverConfig ['cacheDir ' ]);
43+ $ this ->assertCount (0 , $ files );
4344 }
4445 }
4546
You can’t perform that action at this time.
0 commit comments