Пример #1
0
 public function testNotInArrayTranslator()
 {
     $constraintGroup = ConstraintGroupTranslator::create()->notInList($this->valuesArray);
     $this->runNotInArray($constraintGroup);
 }
Пример #2
0
 public function testIsFloatMaxValueTranslator()
 {
     $constraintGroup = ConstraintGroupTranslator::create()->isFloat(null, 1.2);
     $this->runIsFloatMaxValue($constraintGroup);
 }
Пример #3
0
 public function testIsNotNull()
 {
     $constraintGroup = ConstraintGroupTranslator::create()->notNull();
     $this->runIsNotNull($constraintGroup);
 }
Пример #4
0
 /**
  * Generate the ConstraintGroup using the ConstraintGroupTranslater.
  */
 public function testIsBoolRequiresFalseTranslator()
 {
     $constraintGroup = ConstraintGroupTranslator::create()->isBool(false);
     $this->runTestsWithConstraintGroupRequiresFalse($constraintGroup);
     $constraintGroup = ConstraintGroupTranslator::create()->isFalse();
     $this->runTestsWithConstraintGroupRequiresFalse($constraintGroup);
 }
Пример #5
0
 public function testIsEmailTranslator()
 {
     $constraintGroup = ConstraintGroupTranslator::create()->isEmail();
     $this->runIsEmail($constraintGroup);
 }
Пример #6
0
 public function testMaxLengthCheckTranslator()
 {
     $constraintGroup = ConstraintGroupTranslator::create()->isString(null, 5);
     $this->runIsStringMaxLength($constraintGroup);
 }
Пример #7
0
 /**
  * Generate the ConstraintGroup using the ConstraintGroupTranslater.
  */
 public function testIsArrayTranslaterCheck()
 {
     $constraintGroup = ConstraintGroupTranslator::create()->isArray();
     $this->runTestsWithConstraintGroup($constraintGroup);
 }
Пример #8
0
 public function testRequiredClassTranslator()
 {
     $constraintGroup = ConstraintGroupTranslator::create()->isObject('ObjectConstraintTestObject');
     $this->runIsObjectRequiredClass($constraintGroup);
 }