public function rules()
 {
     $rules = array_merge(self::$defaultRules, self::$customRules);
     self::$customRules = array();
     return $rules;
 }
Example #2
0
 public function assertValidation($shouldBeValid = true, $msg)
 {
     $valid = $this->guy->validate();
     $this->assertEquals((bool) $shouldBeValid, $valid, $msg . $this->concatErrors());
 }
 /** @depends testLength */
 public function testCustomErrorMessage()
 {
     BrazilianPerson::$customRules = array('cpf' => array('cpf', 'CpfValidator', 'message' => 'Isso aqui ta errado!'));
     $this->testLength();
     $this->assertModelErrorIs('cpf', 'Isso aqui ta errado!');
 }