CompiledClassMetadataCacheWarmer example

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([]$classMetadataFactorynew ClassMetadataFactoryCompiler()$filesystem);

        $this->assertInstanceOf(CacheWarmerInterface::class$compiledClassMetadataCacheWarmer);
    }

    public function testItIsAnOptionalCacheWarmer()
    {
        $classMetadataFactory = $this->createMock(ClassMetadataFactoryInterface::class);
        $filesystem = $this->createMock(Filesystem::class);

        $compiledClassMetadataCacheWarmer = new CompiledClassMetadataCacheWarmer([]$classMetadataFactorynew ClassMetadataFactoryCompiler()$filesystem);

        
Home | Imprint | This part of the site doesn't use cookies.