class SerializerCacheWarmerTest extends TestCase
{ /**
* @dataProvider loaderProvider
*/
public function testWarmUp(array
$loaders) { $file =
sys_get_temp_dir().'/cache-serializer.php';
@
unlink($file);
$warmer =
new SerializerCacheWarmer($loaders,
$file);
$warmer->
warmUp(\
dirname($file));
$this->
assertFileExists($file);
$arrayPool =
new PhpArrayAdapter($file,
new NullAdapter());
$this->
assertTrue($arrayPool->
getItem('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Person'
)->
isHit());
$this->
assertTrue($arrayPool->
getItem('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Author'
)->
isHit());
} public static function loaderProvider() {