Commit graph

9 commits

Author SHA1 Message Date
Henrique Moody
02a1923eb5 Move unit tests to "tests/unit" 2015-08-11 13:36:25 -03:00
Marcel Voigt
4329252709 Suggest php-cs-fixer and add default config
See .php_cs for default configuration. Install php-cs-fixer globally and run
  php-cs-fixer fix
to fix common coding standards or style issues.
2015-08-10 20:22:04 +02:00
Henrique Moody
743fafb31b Create PHPT tests from AbstractNestedExceptionTest 2015-07-29 17:08:06 -03:00
Henrique Moody
7f8815e7ea AbstractRelated should set names for child rule 2015-06-30 10:38:19 -03:00
Henrique Moody
a3c945aa51 Add license information and copyright in all files 2015-06-08 12:09:25 -03:00
Henrique Moody
b8c76e3054 Fix some coding standards 2015-06-08 11:51:45 -03:00
Andy Wendt
c2cef0d8f4 Replaced phpunit mocks of exception with concretions so they will work in hhvm 2015-02-03 08:45:28 -07:00
Andy Wendt
ab65035181 Issue #260: Now using Respect\Validation exceptions only
* `ExceptionInterface`: all Respect\Validation\Exceptions implement through inheritance
* `ValidatorExceptionInterface`: implemented only by AllOfException.  This allows the end users to know when there has been a Validator exception rather than just any of our exceptions.

Fixed formatting issues

Created two new exception types

* Created ValidationExceptionInterface
* Created NestedValidationExceptionInterface which extends ValidationExceptionInterface
    * Renamed from ValidatorExceptionInterface

* ValidationException implements ValidationExceptionInterface and ValidationExceptionTest checks for the implementation.
* AbstractNestedException implements NestedValidationExceptionInterface and AbstractNestedExceptionTest checks for the implementation.

* CheckExceptionsTest now checks all Rule exceptions to make sure they implement ValidationExceptionInterface
* ValidatorTest now contains test that shows that only ValidationExceptionInterface can be used reliably with `::check()`

* Updated documentation for new exception types
* Reworked examples to show how to catch the exception interfaces

Minor changes in readme.md and ExceptionInterfaces

* Removed `import` statements (hahaha)
* Renamed `$e` to `$exception`

* `ValidationExceptionInterface` now extends `ExceptionInterface`.  Changed `ValidationException` to match
2015-01-31 07:59:59 -07:00
Henrique Moody
eb3b8313aa Move tests files 2015-01-19 11:01:00 -02:00
Renamed from tests/library/Respect/Validation/Exceptions/AbstractNestedExceptionTest.php (Browse further)