public function testRuleEmailInvalido() { $model = new Message(); $model->author_email = 'test@gmail'; $model->validate(); $this->assertTrue($model->hasErrors('author_email')); }