I also decided to make the messages way more straightforward than
before. Instead of showing why the input is not a valid domain, we're
now simply saying that the input is not a proper domain.
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Most of those files have undergone massive changes; in some cases, the
"--CREDITS--" might not make sense.
This is aligned with the latest coding standard changes [1], since we no
longer allow the annotation "@author".
In any case, we can always use `git blame` or `git log` to see the
contributors.
[1]: 9a13c9fb03
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
The integration tests use the same pattern to test exception messages.
With my changes, we won't validate which exception we throw in those
tests, but matching the message is enough. I created three functions to
replace most of those tests.
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
The "Domain" rule duplicates a lot of its logic among the methods
"check()," "validate()," and "assert()." Such duplication makes it hard
to maintain and hard to understand.
Besides that:
- It triggers a PHP error when trying to validate a non-scalar value;
- It does not show the exceptions in the correct hierarchy;
- It allows to change the TLD validation after to object is created.
This commit will fix those issues and create better tests for the rule.
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>