/** * @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())); }
/** * {@inheritdoc} */ public function normalize($data, Resource $resource) { return $this->yamlFileNormalizer->normalize($data, $resource); }