blacklist = ['gimmy@gmail.com']; $rules = [ 'email' => [$email_rule], ]; $data = [ 'email' => 'gimmy@gmail.com', ]; $v = $this->app['validator']->make($data, $rules); $this->assertFalse($v->passes()); } public function testInValidEmailRule() { $rules = [ 'email' => [new EmailBlackListRule], ]; $data = [ 'email' => 'jimmy@candassociates.com', ]; $v = $this->app['validator']->make($data, $rules); $this->assertTrue($v->passes()); } }