/** * @test */ public function runStrictBad() { $key = 'abc'; $value = 123; $validator = new ValidatorService([$key => $value]); $validator->setRule($key, 'ABC', "required|alpha"); try { $validator->runStrict(); $this->fail("Should have thrown exception"); } catch (Behance\NBD\Validation\Exceptions\Validator\FailureException $e) { $this->assertSame($validator, $e->getValidator()); } }