1..9 # ->initialize() ok 1 - ->initialize() takes a mandatory pattern parameter ok 2 - ->initialize() takes a pattern as a parameter ok 3 - ->initialize() changes $error with a custom message if it returns false # ->execute() ok 4 - ->execute() returns true if value match the pattern ok 5 - ->execute() doesn't change $error if it returns true ok 6 - ->execute() returns false if value does not match the pattern ok 7 - ->execute() changes $error with a default message if it returns false ok 8 - ->execute() returns false if value match the pattern and match parameter is false ok 9 - ->execute() returns true if value does not match the pattern and match parameter is false Looks like everything went fine.