- Validates properties - Auto-generates property values - Generates extra node addition operations that follow from the node definition. Adapted from the jackalope-doctrine-dbal implementation: https://github.com/jackalope/jackalope-doctrine-dbal/blob/31cca1d1fb7fbe56423fa34478e15ce6d93313fd/src/Jackalope/Transport/DoctrineDBAL/Client.php
Пример #1
0
 /**
  * @dataProvider providePropertyValidationOutOfRangeCharacters
  */
 public function testPropertyValidationOutOfRangeCharacters($value, $isValid)
 {
     $property = $this->getPropertyMock(array('getType' => PropertyType::STRING, 'isMultiple' => false, 'getValue' => $value, 'getPath' => '/path/to'));
     if (false === $isValid) {
         $this->setExpectedException('PHPCR\\ValueFormatException', 'Invalid character detected in value');
     }
     $nodeType = $this->getNodeTypeMock(array('getDeclaredChildNodeDefinitions' => array(), 'getDeclaredPropertyDefinitions' => array(), 'getDeclaredSupertypes' => array(), 'getName' => 'node-type-1'));
     $node = $this->getNodeMock(array('getPrimaryNodeType' => $nodeType, 'getMixinNodeTypes' => array(), 'getProperties' => array($property), 'getName' => 'node1', 'getPath' => 'path/to/node'));
     $this->processor->process($node);
 }