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