* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Cache\Tests\Adapter; use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\Cache\Adapter\FilesystemAdapter; /** * @group time-sensitive */ class FilesystemAdapterTest extends AdapterTestCase { public function createCachePool($defaultLifetime = 0) { return new FilesystemAdapter('', $defaultLifetime); } public static function tearDownAfterClass() { self::rmdir(sys_get_temp_dir().'/symfony-cache'); } public static function rmdir($dir) { if (!file_exists($dir)) { return; } if (!$dir || 0 !== strpos(dirname($dir), sys_get_temp_dir())) { throw new \Exception(__METHOD__."() operates only on subdirs of system's temp dir"); } $children = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::CHILD_FIRST ); foreach ($children as $child) { if ($child->isDir()) { rmdir($child); } else { unlink($child); } } rmdir($dir); } protected function isPruned(CacheItemPoolInterface $cache, $name) { $getFileMethod = (new \ReflectionObject($cache))->getMethod('getFile'); $getFileMethod->setAccessible(true); return !file_exists($getFileMethod->invoke($cache, $name)); } } __halt_compiler();----SIGNATURE:----qw15LPNoK9Zp4Z3ODVfrWhu/VksO4EfYF8DCHB6DDVgLYIJq8rRm0ObQNdeh/G9Wq35QJ6Dy6CzbgfGSHr+wHNCZ3uOxO5DrPK614C8z8B9qcehG78sv0id3EWRcEQASsF0k4E2bZFEltwpwUd6D9K77OqLhiRBagYbIUL774wqtzzTKqf4Vw2+tgB75OPDRgrcbEP+//4Z8iBUgOc5ZypJhVV9VTv4a7ecPJ2F95AVhkhPtV8FU8JqxLcceBTsGzc1ZDVbjuXm1BrwXLRNOolNCbMw8YGFgFDaq2333iIbc6xwLIPp8hMXqdBuL/mw5frMujlEEwakgTMHUpUdoKNbQQo75zJLWQu7mFFLCm7fk29KffrBLWicAJr+BBBjZvnqSu+gLpmpiUfM9sV/W14AhrHOHbtqsXw4qynICmsvHupWhv1CzUf5HuTXkOnc5v8CqoWCCGJfFOD/k6aP+zrk4BxKH6MwL9S+/sDHCfIVWDJl3nfUFnxL+8JEAYQeyj2tEm1fF8Wan4/7Yrw5gcqywfZADMCZez5Ur5JU2V7k0bbFFjUiJhRb1rLsyOBLEhtks2ip9M/VPbEfU8oscBd7V8pTHoX6OZ50x5ySHzXIWtiOFVogmchIdtF8n2WwGm/corRE53W3BU2okmDDpRY35BlMGpmFWiE3jDvQMsgc=----ATTACHMENT:----OTY3NjU1MDcxMDY5MDkwIDQyMjQxOTM1MzgwNTg2MTggNjQxNTM0MTgzNjM2OTE1Mg==