コード例 #1
0
 /**
  * @covers Yosmanyga\Validation\Resource\Normalizer\YamlFile\ArrayNormalizer::normalize
  */
 public function testNormalizeWithMap()
 {
     $valueDefinition = new ValueDefinition();
     $valueDefinition->allowNull = true;
     $arrayDefinition = new ArrayDefinition();
     $arrayDefinition->map = $valueDefinition;
     $normalizer = new ArrayNormalizer();
     $this->assertEquals($arrayDefinition, $normalizer->normalize(array('value' => array('map' => array('validator' => 'Value', 'options' => array('allowNull' => true)))), new Resource()));
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function normalize($data, Resource $resource)
 {
     return $this->yamlFileNormalizer->normalize($data, $resource);
 }