respect-validation/tests/unit/Rules
Henrique Moody 8c529c433e
Refactor ValidationException
Make the ValidationException a little bit less mutable than before. All
its dependencies are now passed into the constructor.

This commit also make the Factory pass the translator to the exceptions
allowing to define the translator before the exception gets created.
This change is not the ideal one, later I would like to not need the
Singleton from the Factory to do that, but for now it seems like a good
approach.

One more thing that this commit does is to introduce the "id" for
Exceptions. Key can be either the defined "name" or the name of the rule
that throwed the exception. This method will be handy to identify
exceptions better.

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2018-05-27 16:12:05 +02:00
..
Locale Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
AbstractCompositeTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
AbstractCtypeRuleTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
AbstractEnvelopeTest.php Create "AbstractEnvelope" class 2018-03-22 19:41:10 +01:00
AbstractFilterRuleTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
AbstractRegexRuleTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
AbstractRelatedTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
AbstractRuleTest.php Refactor ValidationException 2018-05-27 16:12:05 +02:00
AbstractSearcherTest.php Apply contribution guidelines to "AbstractSearcher" 2018-01-19 21:41:34 +01:00
AbstractWrapperTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
AllOfTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
AlnumTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
AlphaTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
AlwaysInvalidTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
AlwaysValidTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
AnyOfTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
ArrayTypeTest.php Apply contribution guidelines to "ArrayType" rule 2018-03-16 11:19:14 +01:00
ArrayValTest.php Apply contribution guidelines to "ArrayVal" rule 2018-04-02 23:19:22 +02:00
AttributeTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
Base64Test.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
BaseTest.php Refactor ValidationException 2018-05-27 16:12:05 +02:00
BetweenTest.php Make "Between" rule extend "AbstractEnvelop" 2018-03-22 19:47:57 +01:00
BoolTypeTest.php Apply contribution guidelines to "BoolType" rule 2018-03-27 00:09:58 +02:00
BoolValTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
BsnTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
CallableTypeTest.php Apply contribution guidelines to "CallableType" rule 2018-05-19 17:07:59 +02:00
CallbackTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
CallTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
CharsetTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
CnhTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
CnpjTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
CntrlTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
ConsonantTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
ContainsTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
CountableTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
CountryCodeTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
CpfTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
CreditCardTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
CurrencyCodeTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
DateTest.php Create "Date" rule 2018-01-29 09:39:57 +01:00
DateTimeTest.php Fix coding standards 2018-02-04 01:00:30 +01:00
DigitTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
DirectoryTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
DomainTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
EachTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
EmailTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
EndsWithTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
EqualsTest.php Apply contribution guidelines to "Equals" rule 2018-01-15 09:16:45 +01:00
EvenTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
ExecutableTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
ExistsTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
ExtensionTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
FactorTest.php Remove method stringify from ValidationException 2018-05-27 16:12:05 +02:00
FalseValTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
FibonacciTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
FileTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
FilterVarTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
FiniteTest.php Add "respect/stringifier" as dependency 2018-01-06 14:07:03 +01:00
FloatTypeTest.php Apply contribution guidelines to "FloatType" rule 2018-03-27 00:17:34 +02:00
FloatValTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
GraphTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
HexRgbColorTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
IdenticalTest.php Fix coding standards 2018-02-04 01:00:30 +01:00
ImageTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
ImeiTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
InfiniteTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
InstanceTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
InTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
IntTypeTest.php Apply contribution guidelines to "IntType" rule 2018-03-27 00:25:26 +02:00
IntValTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
IpTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
IterableTypeTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
JsonTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
KeyNestedTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
KeySetTest.php Refactor "KeySet" rule 2018-03-03 18:59:36 +01:00
KeyTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
KeyValueTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
LanguageCodeTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
LeapDateTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
LeapYearTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
LengthTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
LowercaseTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
LuhnTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
MacAddressTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
MaxTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
MimetypeTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
MinimumAgeTest.php Refactor rules related to age 2018-02-24 09:28:54 +01:00
MinTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
MultipleTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
NegativeTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
NfeAccessKeyTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
NifTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
NoneOfTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
NotBlankTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
NotEmptyTest.php Apply contribution guidelines to "NotEmpty" rule 2018-05-02 16:04:05 +02:00
NoTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
NotOptionalTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
NotTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
NoWhitespaceTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
NullableTest.php Create "Nullable" rule 2018-02-23 09:20:51 +01:00
NullTypeTest.php Apply contribution guidelines to "NullType" rule 2018-03-27 00:32:05 +02:00
NumberTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
NumericValTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
ObjectTypeTest.php Apply contribution guidelines to "ObjectType" rule 2018-05-19 19:12:59 +02:00
OddTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
OneOfTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
OptionalTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
PerfectSquareTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
PeselTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
PhoneTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
PhpLabelTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
PisTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
PositiveTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
PostalCodeTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
PrimeNumberTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
PrntTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
PunctTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
ReadableTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
RegexTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
ResourceTypeTest.php Apply contribution guidelines to "ResourceType" rule 2018-03-27 00:44:48 +02:00
RomanTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
ScalarValTest.php Apply contribution guidelines to "ScalarVal" rule 2018-03-09 15:07:58 +01:00
SfTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
SizeTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
SlugTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
SortedTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
SpaceTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
StartsWithTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
StringTypeTest.php Apply contribution guidelines to "StringType" rule 2018-03-09 15:56:10 +01:00
StringValTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
SubdivisionCodeTest.php Refactor "AbstractWrapper" class 2018-01-28 13:20:27 +01:00
SymbolicLinkTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
TimeTest.php Create "Time" rule 2018-01-30 09:47:41 +01:00
TldTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
TrueValTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
TypeTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
UniqueTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
UploadedTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
UppercaseTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
UrlTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
UuidTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
VatinTest.php Refactor "AbstractWrapper" class 2018-01-28 13:20:27 +01:00
VersionTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
VideoUrlTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
VowelTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
WhenTest.php Improve RuleTestCase class 2018-01-07 14:32:05 +01:00
WritableTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
XdigitTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00
YesTest.php Changes on PHP-CS-Fixer configuration 2018-01-04 17:59:37 +01:00
ZendTest.php Method assert() should not have a return value 2018-01-28 17:38:40 +01:00