Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ytake committed Oct 14, 2015
1 parent 2c01cd5 commit d1780cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/Console/ClearCacheCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ public function fire()

$driverConfig = $configure['aop'][$configure['default']];
if (isset($driverConfig['cacheDir'])) {
$compileCaches = $this->filesystem->glob($driverConfig['cacheDir'] . '/*');
foreach ($compileCaches as $file) {
$this->filesystem->deleteDirectory($file);
}
$this->filesystem->cleanDirectory($driverConfig['cacheDir']);
}
$this->info('aspect/annotation cache clear!');
}
Expand Down
1 change: 0 additions & 1 deletion tests/CacheableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ protected function resolveManager()
{
$annotation = new \Ytake\LaravelAspect\Annotation;
$annotation->registerAspectAnnotations();
/** @var \Ytake\LaravelAop\GoAspect $aspect */
$aspect = $this->manager->driver('go');
$aspect->register();
}
Expand Down
3 changes: 2 additions & 1 deletion tests/Commands/AspectClearCacheCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public function testCacheClearFile()
$configure = $this->app['config']->get('ytake-laravel-aop');
$driverConfig = $configure['aop'][$configure['default']];
if(isset($driverConfig['cacheDir'])) {
$this->assertFalse($this->app['filesystem']->exists($driverConfig['cacheDir']));
$files = $this->app['filesystem']->files($driverConfig['cacheDir']);
$this->assertCount(0, $files);
}
}

Expand Down

0 comments on commit d1780cf

Please sign in to comment.