public function testUseCache() { $cacheItemPool = new ArrayAdapter(); $this->builder->setCacheItemPool($cacheItemPool); $this->assertEquals($cacheItemPool, $this->builder->getCacheItemPool()); $this->assertInstanceOf(PropertyAccessor::class, $this->builder->getPropertyAccessor()); }
/** * AccessorWriter constructor. * * @param PropertyAccessorBuilder|null $builder */ public function __construct(PropertyAccessorBuilder $builder = null) { if (!$builder) { $builder = new PropertyAccessorBuilder(); } $this->accessor = $builder->getPropertyAccessor(); }
public function testGetPropertyAccessor() { $this->assertInstanceOf('Symfony\\Component\\PropertyAccess\\PropertyAccessor', $this->builder->getPropertyAccessor()); $this->assertInstanceOf('Symfony\\Component\\PropertyAccess\\PropertyAccessor', $this->builder->enableMagicCall()->getPropertyAccessor()); }