use Symfony\Component\Serializer\CacheWarmer\CompiledClassMetadataCacheWarmer;
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryCompiler;
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface;
final class CompiledClassMetadataCacheWarmerTest extends TestCase
{ public function testItImplementsCacheWarmerInterface() { $classMetadataFactory =
$this->
createMock(ClassMetadataFactoryInterface::
class);
$filesystem =
$this->
createMock(Filesystem::
class);
$compiledClassMetadataCacheWarmer =
new CompiledClassMetadataCacheWarmer([],
$classMetadataFactory,
new ClassMetadataFactoryCompiler(),
$filesystem);
$this->
assertInstanceOf(CacheWarmerInterface::
class,
$compiledClassMetadataCacheWarmer);
} public function testItIsAnOptionalCacheWarmer() { $classMetadataFactory =
$this->
createMock(ClassMetadataFactoryInterface::
class);
$filesystem =
$this->
createMock(Filesystem::
class);
$compiledClassMetadataCacheWarmer =
new CompiledClassMetadataCacheWarmer([],
$classMetadataFactory,
new ClassMetadataFactoryCompiler(),
$filesystem);