/** * {@inheritdoc} */ public function ratify($value, PropertyDefinitionInterface $definition = null) { if (is_null($definition)) { throw new InvalidArgumentException("Property is not a named (defined) property"); } return parent::ratify($value, $definition); }
/** * https://github.com/CodeBlanche/Entity/issues/23 */ public function testRatifyCastMapType() { $ratifiedValue = $this->obj->ratify('10', $this->createDefinition('testProperty', 'int')); $this->assertTrue($ratifiedValue === 10); }