コード例 #1
0
 public function rules()
 {
     $rules = array_merge(self::$defaultRules, self::$customRules);
     self::$customRules = array();
     return $rules;
 }
コード例 #2
0
 /** @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!');
 }