public function testCanConstruct()
 {
     $this->assertInstanceOf('\\SMW\\DataValues\\ValueValidatorRegistry', new ValueValidatorRegistry());
     ValueValidatorRegistry::clear();
     $this->assertInstanceOf('\\SMW\\DataValues\\ValueValidatorRegistry', ValueValidatorRegistry::getInstance());
     ValueValidatorRegistry::clear();
 }
Пример #2
0
 /**
  * Check if property is range restricted and, if so, whether the current value is allowed.
  * Creates an error if the value is illegal.
  */
 protected function checkAllowedValues()
 {
     ValueValidatorRegistry::getInstance()->getConstraintValueValidator()->validate($this);
 }
 /**
  * @since 2.4
  */
 public function clear()
 {
     $this->dataTypeRegistry->clear();
     ValueValidatorRegistry::getInstance()->clear();
     self::$instance = null;
 }