read() публичный Метод

public read ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey )
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface
Пример #1
0
 public function testReadPropertyNotExists()
 {
     $webspaceKey = 'sulu_io';
     $locale = 'de';
     $node = $this->prophesize(NodeInterface::class);
     $node->hasProperty('test')->willReturn(false);
     $node->getPropertyValue('test')->shouldNotBeCalled();
     $property = $this->prophesize(PropertyInterface::class);
     $property->getName()->willReturn('test');
     $property->setValue('')->willReturn(null);
     $date = new Date('test.html.twig');
     $date->read($node->reveal(), $property->reveal(), $webspaceKey, $locale, null);
     $property->setValue('')->shouldBeCalled();
 }