芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/rentandbuyrealty.com/pay/vendor/jms/metadata/tests/Cache/FileCacheTest.php
dir = sys_get_temp_dir() . '/jms-' . md5(__CLASS__); if (is_dir($this->dir)) { array_map('unlink', glob($this->dir . '/*')); } else { mkdir($this->dir); } } public function testLoadEvictPutClassMetadataFromInCache() { $cache = new FileCache($this->dir); $this->assertNull($cache->load(TestObject::class)); $cache->put($metadata = new ClassMetadata(TestObject::class)); $this->assertEquals($metadata, $cache->load(TestObject::class)); $cache->evict(TestObject::class); $this->assertNull($cache->load(TestObject::class)); } public function provideCorruptedCache() { yield 'No return statement' => [' ['dir); file_put_contents($this->dir.'/Metadata-Tests-Fixtures-TestObject.cache.php', $fileContents); $this->assertNull($cache->load(TestObject::class)); } }