/** * Complex test with exception * * @expectedException \Bluz\Validator\Exception\ValidatorException */ public function testAssertComplexRuleValidation() { $validator = Validator::alphaNumeric('_')->length(1, 15)->noWhitespace(); $validator->assert('invalid user name'); }