Esempio n. 1
0
 public function testThatParserCanNormalizeValidatorNameByRemovingUnderscoreAndCapitalizeWordsLetter()
 {
     $this->assertEquals('LengthMax', $this->ruleParse->normalizeName('length_max'));
     $this->assertEquals('IsInstanceOf', $this->ruleParse->normalizeName('is_instance_of'));
 }
Esempio n. 2
0
 /**
  * Get an instance of our rules bag which has all validation information.
  *
  * @return RulesBag
  */
 public function getRulesBag()
 {
     $ruleParser = new RuleParser($this->data);
     $ruleParser->run($this->rules);
     return $ruleParser->getRulesBag();
 }