diff -r 000000000000 -r 7f95f8617b0b vendor/assetic/tests/Assetic/Test/Cache/FilesystemCacheTest.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/assetic/tests/Assetic/Test/Cache/FilesystemCacheTest.php Sat Sep 24 15:40:41 2011 +0200 @@ -0,0 +1,52 @@ +assertFalse($cache->has('foo')); + + $cache->set('foo', 'bar'); + $this->assertEquals('bar', $cache->get('foo')); + + $this->assertTrue($cache->has('foo')); + + $cache->remove('foo'); + $this->assertFalse($cache->has('foo')); + } + + public function testSetCreatesDir() + { + $dir = sys_get_temp_dir().'/assetic/fscachetest'; + + $tearDown = function() use($dir) + { + array_map('unlink', glob($dir.'/*')); + @rmdir($dir); + }; + + $tearDown(); + + $cache = new FilesystemCache($dir); + $cache->set('foo', 'bar'); + + $this->assertFileExists($dir.'/foo'); + + $tearDown(); + } +}