public function rules() { $rules = array_merge(self::$defaultRules, self::$customRules); self::$customRules = array(); return $rules; }
/** @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!'); }