public function testClear()
{
file_put_contents($this->app['config']['root_dir'] . '/app/cache/.dummykeep', 'test');
// 'doctrine', 'profiler', 'twig' ディレクトリを削除
Cache::clear($this->app, false);
$finder = new Finder();
$iterator = $finder->ignoreDotFiles(false)->in($this->app['config']['root_dir'] . '/app/cache')->files();
foreach ($iterator as $fileinfo) {
$this->assertStringEndsWith('keep', $fileinfo->getPathname(), 'keep しか存在しないはず');
}
$this->assertTrue($this->root->hasChild('app/cache/.gitkeep'), '.gitkeep は存在するはず');
$this->assertTrue($this->root->hasChild('app/cache/.dummykeep'), '.dummykeep は存在するはず');
}