/** * {@inheritdoc} */ public function ratify($value, PropertyDefinitionInterface $definition = null) { $value = parent::ratify($value, $definition); if (is_null($value)) { return $value; } $type = $definition->getType(); $name = $definition->getName(); $this->validateType($value, $type, $name); if ($definition->isGeneric()) { $type = $definition->getGenericType(); $this->validateGenericType($value, $type, $name); } return $value; }
/** * @expectedException InvalidArgumentException */ public function testRatifyException() { $this->obj->ratify('someValue', null); }