Henrique Moody
92a8ab13cf
Fix coding standards
...
These are the changes after running the last version of PHP-CS-Fixer.
2018-02-04 01:00:30 +01:00
Henrique Moody
fb2ebaf5d6
Apply contribution guidelines to "DateTime" rule
...
This commit also makes some changes in how the `DateTime` rule behaves,
by not accepting `DateTimeInterface` as valid when a format is given.
Also:
- Create `DateTimeHelper` to eliminate some code duplication;
- Create integration tests for `DateTime` rule;
- Rename "format" placeholder to "sample" in the message;
- Update documentation of "DateTime" rule.
2018-01-30 20:17:10 +01:00
Henrique Moody
2007c7dc6e
Create "Time" rule
2018-01-30 09:47:41 +01:00
Henrique Moody
0db1cd6e1b
Create "Date" rule
2018-01-29 09:39:57 +01:00
Henrique Moody
c80524b457
Method assert()
should not have a return value
...
One this method should throw an exception when the input is not valid,
returning `TRUE` when it succeeds is not really consistent.
2018-01-28 17:38:40 +01:00
Henrique Moody
30dc089565
Method check()
should not have a return value
...
One this method should throw an exception when the input is not valid,
returning `TRUE` when it succeeds is not really consistent.
2018-01-28 17:38:40 +01:00
Henrique Moody
aa7d84c3ea
Refactor "AbstractWrapper" class
...
This commit also creates `AbstractLocaleWrapper` to help creating
locale-based rules.
2018-01-28 13:20:27 +01:00
Henrique Moody
550795c1e2
Move namespace "SubdivisionCode" to "Locale"
2018-01-28 13:06:55 +01:00
Henrique Moody
9bad066765
Apply contribution guidelines to "AbstractSearcher"
...
Refactor `AbstractSearcher` class and its children. Also most of the
unnecessary logic that was on `AbstractSearcher` was put back into `In`
class.
This commit also updates all "SubdivisionCode" rules.
The script used to create the classes can be found on:
https://gist.github.com/henriquemoody/ec404f994a87b18c7771
2018-01-19 21:41:34 +01:00
Henrique Moody
c33bcce239
Create UndefinedHelper trait
...
In order to remove some code duplication and make this validation
reusable that the trait `UndefinedHelper` is being created.
2018-01-18 21:02:01 +01:00
Henrique Moody
2a2bb6dd76
Apply contribution guidelines to "Identical" rule
2018-01-15 09:35:22 +01:00
Henrique Moody
02b51782c3
Apply contribution guidelines to "Equals" rule
2018-01-15 09:16:45 +01:00
Henrique Moody
1f217dda66
Refactor Factory class
...
With this code the Factory class will be used also to create Exceptions.
In order to do that, the AbstractRule::reportError() was changed, so the
tests of the AbstractRule class.
What this commit also does:
- Port code to PHP 7;
- Do not keep the default instance of the Factory in the Validator
class;
- Make Factory final.
2018-01-14 16:26:35 +01:00
Henrique Moody
fe3654b270
Improve RuleTestCase class
...
- Add documentation to the class and its methods;
- Move RuleTestCase to Test namespace;
- Use PHP 7 type hinting;
- Rename getRuleMock() to createValidatableMock().
2018-01-07 14:32:05 +01:00
Henrique Moody
2d7e2ea48f
Add "respect/stringifier" as dependency
...
Due to this change it was possible to identify that NotEmptyException,
and NotOptionalException where not working as they should. A fix was
made along with this commit.
2018-01-06 14:07:03 +01:00
Henrique Moody
ef975629f3
Changes on PHP-CS-Fixer configuration
...
Because of `declare(strict_types=1)` some changes were necessary.
2018-01-04 17:59:37 +01:00
Henrique Moody
b10206bd28
Merge branch '1.1'
2018-01-02 22:57:58 +01:00
Henrique Moody
ee9e69776a
Merge branch '1.0' into 1.1
2018-01-02 22:47:22 +01:00
Henrique Moody
c931e2504b
Change conditions for Domain validation
...
Domains can have `--` as long as they don't start or end with `-` in its
parts.
2018-01-02 22:24:43 +01:00
Henrique Moody
37a71de7d0
Try to find template from default templates first
...
When executing `ValidationException::setTemplate()` using a template
key, it does not try to select the template, but instead it uses the
template key as the template itself.
In order to fix this behaviour, there is now a check for a key with the
defined template. In case the template was not found, use the defined
template as the template itself.
2018-01-02 21:56:07 +01:00
Henrique Moody
d072b4de6a
Remove "malkusch/bav" as dependency
...
And was that, without warning that the "malkusch/bav" package was
removed from Packagist. This commit removes it as dependency but do not
remove any class that uses it in case there is a user loading the
package from a VCS repository with Composer.
2018-01-02 21:45:22 +01:00
Henrique Moody
fa030637cc
Fix wrong call to PHPUnit assertions
...
The assertion methods are all static, therefore they should be called
with self::assert* instead of $this->assert*.
2017-11-12 14:35:19 +01:00
Gabriel Caruso
93ce9cb93a
Updated to PHPUnit 6
2017-11-12 14:22:22 +01:00
Henrique Moody
5b7ea399c0
Fix coding standards
2017-11-12 14:21:46 +01:00
Henrique Moody
d8e5f305a7
Remove "malkusch/bav" as a dependency
...
This packages is not maintained anymore, therefore it should be removed
from our codebase.
2017-11-12 13:59:05 +01:00
Henrique Moody
20979898c5
Merge branch '1.1'
2017-10-17 12:38:16 +02:00
Henrique Moody
22f1f14430
Merge branch '1.0' into 1.1
2017-10-17 12:15:51 +02:00
Henrique Moody
14572537fe
Improve "Phone" rule
...
- Only allow spaces and not "\t" or "\n";
- Once the number has a "(", it needs a ")".
2017-10-17 09:51:09 +02:00
RCooLeR
191ee47fc0
Update regex of "Phone" rule
...
Now regex also matches +1 (555) 555 5555
2017-10-17 08:58:47 +02:00
mazanax
8b3790103e
Create "Luhn" rule
2017-10-16 20:38:56 +02:00
Henrique Moody
fd1964d887
Merge branch '1.1'
2017-10-16 10:43:22 +02:00
Henrique Moody
631affdbf2
Merge branch '1.0' into 1.1
2017-10-16 10:39:15 +02:00
Henrique Moody
658764a47f
Skip MimetypeTest when in HHVM
2017-10-16 10:16:47 +02:00
Jens Segers
7d42813fb7
Create "Base64" rule
2017-10-15 19:38:31 +02:00
Dick van der Heiden
327297ca6f
Create "Uuid" rule
2017-10-15 18:34:38 +02:00
Ian
d65e713080
Improve grammar of "Equals" rule
2017-10-15 18:27:36 +02:00
Mikhail Vyrtsev
115ec0cd66
fix fix assertion when neighbour values are equal >_<
2017-06-29 06:00:26 +03:00
Mikhail Vyrtsev
ce3597bce5
fix assertion when neighbour values are equal
2017-06-29 05:54:48 +03:00
Mikhail Vyrtsev
8d8735cdd0
fix indentation >_<
2017-06-29 05:42:29 +03:00
Mikhail Vyrtsev
52c8541b9e
New rule: Sorted
2017-06-29 05:18:02 +03:00
Henrique Moody
0338e18e83
Rename rule "Date" to "DateTime"
...
Also change rules to use `DateTimeInterface` and `DateTimeImmutable`
when possible.
2017-05-01 13:16:59 +02:00
Henrique Moody
14d87da7d8
Fix minor code standards
2017-05-01 09:36:41 +02:00
Vitaliy
82f53d27e1
Create "Number" rule
2017-04-19 09:49:58 +02:00
Krzysztof Śmiałek
04e8b72908
Create "Unique" rule
2017-04-12 11:23:44 +02:00
Senén
b2faf8332b
Fix Nif Validator
2017-04-11 23:16:58 +02:00
Bruno Koga
a0ba215524
Create "Pis" rule
2017-03-27 11:42:24 +02:00
Jonathan Stewmon
8851fb5abc
Always display message for AbstractRelated
rule
...
`NestedValidationException` should include all `AbstractRelated` rule
exceptions.
`AbstractRelated` rule failures always indicate an interesting nested
context, which should not be omitted from the final result.
`NonOmissibleExceptionInterface` is a marker interface for
exceptions thrown by instances of `AbstractRelated`, which
facilitates identification of those rules' exceptions with
`instanceof`.
2017-03-27 10:21:45 +02:00
Henrique Moody
88e60b6a3a
Fix coding standard on PHPT file
2017-03-26 19:58:01 +02:00
Henrique Moody
2b8c560db4
Merge branch '1.1'
2017-03-14 10:46:47 +01:00
Henrique Moody
5ab87d1dd9
Merge branch '1.0' into 1.1
2017-03-14 10:44:11 +01:00
Henrique Moody
dc869ac375
Only return "name" as is if it's a string
2017-03-14 10:28:03 +01:00
Henrique Moody
b43c9b103b
Better message for Length rule
...
Update exception message when minimum value and maximum value are the
same.
2017-02-12 18:18:39 +01:00
Bogus
bb5ad2d988
Replaced TLDs with current list from IANA
2017-02-08 09:22:25 +01:00
Henrique Moody
3bccf23673
Fix code standards on callback
2017-02-05 15:53:47 +01:00
Henrique Moody
86623fc3ca
SimpleXMLElement can also be used as an array
2017-02-05 15:03:48 +01:00
Bradyn Poulsen
d48b55a092
Create "OneOf" rule
2017-02-05 14:49:07 +01:00
Henrique Moody
7ee4ae47d5
Rename "OneOf" to "AnyOf"
2017-02-05 12:28:08 +01:00
Henrique Moody
27d35987be
Create "StringVal" rule
2017-02-04 15:16:00 +01:00
Henrique Moody
d67394cd39
Escape fully qualified class names
2017-02-04 14:01:14 +01:00
Henrique Moody
25bffa00e2
Merge branch '1.1'
2017-01-26 15:41:19 +01:00
Henrique Moody
03f4abbd08
Merge branch '1.0' into 1.1
2017-01-26 15:39:48 +01:00
Renato Moura
e4ae02fe94
Fix "Cnpj" rule
2017-01-25 17:41:21 +01:00
Andy Snell
94a79c033a
Update MasterCard BIN Range
...
Updates the CreditCard validator regex for the MasterCard brand to match 16-digit card numbers starting with 22 - 27. Additionally, updates the unit test for CreditCard with a published test card in the new BIN range.
Additional information on the BIN range update can be found at: https://www.mastercard.us/en-us/issuers/get-support/2-series-bin-expansion.html
2016-12-04 23:56:43 -05:00
Henrique Moody
e708edd005
Rename rule "Numeric" to "NumericVal"
2016-11-06 18:45:44 +01:00
Henrique Moody
6f5c623926
Use class
constant instead of FQCN
2016-10-30 20:16:13 +01:00
Henrique Moody
f34a34c0b2
Always use mbstring functions
2016-10-30 10:45:30 +01:00
Henrique Moody
4d72af312f
Update PHP-CS-Fixer settings
2016-10-30 10:39:23 +01:00
Henrique Moody
f2bb77bb8e
Create tests for "egulias/email-validator" ~2.1
2016-10-29 15:37:09 +02:00
Henrique Moody
c65e1e37f9
Merge branch '1.1'
2016-10-29 15:30:23 +02:00
Henrique Moody
710e807a68
Merge branch '1.0' into 1.1
2016-10-29 15:29:17 +02:00
Henrique Moody
f82fcf0762
Prevent "Regex" to process non-string inputs
2016-10-29 15:21:14 +02:00
Julián Gutiérrez
195a8fe534
Create "Nif" rule
...
Rule to validate spanish NIF (DNI/NIE/CIF).
2016-10-09 17:50:52 +02:00
Henrique Moody
639cfdb3c7
Replace getMock()
by createMock()
2016-09-20 08:46:56 +02:00
Henrique Moody
08ea9b7925
Merge branch '1.1'
2016-09-20 08:45:34 +02:00
Henrique Moody
e457f19dbd
Merge branch '1.0' into 1.1
2016-09-20 08:44:39 +02:00
Henrique Moody
98050476c6
Always return a valid exception
...
If calling the method `getExceptionForPath()` when the exception was
nested but had no child it was returning null. This commit ensures that
it always return a valid exception.
2016-09-19 18:22:39 +02:00
Henrique Moody
6ee9776ea9
Merge branch '1.1'
2016-09-19 11:25:42 +02:00
Henrique Moody
3fa5bc0489
Merge branch '1.0' into 1.1
2016-09-19 11:24:33 +02:00
Emmerson
d0a98ae5d3
Date rule accepting scalar and DateTimeInterface
2016-09-19 10:13:01 +02:00
Tomasz Regdos
38aedd01e3
Create "Vatin" rule (VAT identification number)
...
See https://en.wikipedia.org/wiki/VAT_identification_number
2016-09-19 09:50:50 +02:00
Henrique Moody
332b0d7bb6
Merge branch '1.1'
2016-09-19 09:33:16 +02:00
Henrique Moody
c79d8fdf4f
Change file mode of "Image" rule
2016-09-19 09:32:42 +02:00
Gabriel Pedro
a772d7f89a
Replace CNH validation algorithm
...
The old algorithm not working with some CNH values, e.g 00641829409.
You can even do some checking on
http://www.detran.pr.gov.br/modules/catasg/servicos-detalhes.php?tema=motorista&id=239 .
Original algo can be found on
http://forum.imasters.com.br/topic/400293-validate-br .
2016-09-18 13:25:18 +02:00
Henrique Moody
4eb6d8090f
Merge branch '1.1'
2016-09-17 21:39:18 +02:00
Henrique Moody
edf4e49ac6
Merge branch '1.0' into 1.1
2016-09-17 21:30:00 +02:00
Henrique Moody
4bcc4027f8
Try to use the getRelatedByName()
method first
...
Then using the `findMessages()` method, tries to use the method
`getRelatedByName()` before using the `findRelated()` method.
This change was made because since on `KeyNested` rule you may have
names with '.' we'll never get the proper exception using
`findRelated()`.
2016-09-17 21:11:55 +02:00
Henrique Moody
98443bad0c
Get the proper exception when using findMessage()
2016-09-17 21:04:24 +02:00
Henrique Moody
494b67871f
Fix wrong behaviour on AbstractRelated
...
When you define the name for an `AbstractRelated` instance, you expect
that it also define the name for its child. But, when the child already
had a name the `AbstractRelated` was overwriting its name with the
`reference`.
2016-09-17 20:23:38 +02:00
Henrique Moody
d716214258
Merge branch '1.1'
2016-09-13 11:33:55 +02:00
Henrique Moody
6d0e3a2422
Merge branch '1.0' into 1.1
2016-09-13 11:32:43 +02:00
Henrique Moody
7e88a7a0c8
Always check the type then executing KeyNested
2016-09-12 18:06:10 +02:00
Henrique Moody
fb471f9667
Remove deprecated "Iterable" rule
2016-08-03 11:08:22 +02:00
Henrique Moody
89c82b2fa2
Merge branch '1.1'
2016-08-03 10:54:28 +02:00
Henrique Moody
cc179f9209
Merge branch '1.0' into 1.1
2016-08-03 10:53:00 +02:00
Henrique Moody
e5fdd87a16
Rename "Iterable" to "IterableType"
2016-08-03 10:43:33 +02:00
Royall Spence
0d4659c08f
replace deprecated getMock with createMock
2016-07-29 20:47:42 -04:00
Henrique Moody
d2c8b4db63
Merge branch '1.1'
2016-07-01 16:23:01 +02:00
Tomasz Regdos
73a9ff40eb
Fix Pesel validator when first char is zero
2016-07-01 16:22:12 +02:00
Henrique Moody
8b7f48c3b7
Upgrade PHPUnit version
2016-05-25 23:25:28 +02:00
Henrique Moody
3e1988f9c1
Merge branch '1.0' into 1.1
2016-05-05 13:03:25 +02:00
Emmerson
d9a4c78b16
Fixes 'KeySet' rule when input is not array type
2016-05-05 13:01:04 +02:00
Kennedy Tedesco
cca733919c
Throw an exception when age is not an integer
2016-04-23 21:43:19 -03:00
Augusto Pascutti
9460a4c237
Ensure namespace separator on appended prefixes
...
Appending a prefix to search new rules under required that the namespace
(prefix) being added always ended with a trailing namespace character so
rules could successfully be found under it. This ensures that the
separator is always present.
Changes a test for a rule which does not implement Respect's interface
to an actual class so we don't need to declare one to use as a stub.
2016-04-23 21:20:54 -03:00
Henrique Moody
bb0e40a08e
Set template for the only rule in the chain
...
When there is just one rule in the chain and the there is a defined
template for that, the expected behaviour when using the `check()`
method is to see the exception message with the defined template.
2016-04-08 13:39:57 -03:00
Henrique Moody
46541c7e46
Allow the define brands for credit card validation
2016-04-06 16:42:49 -03:00
Henrique Moody
f3ad53dd14
Merge branch '1.0'
2016-03-31 14:44:58 -03:00
Henrique Moody
294368294f
Merge branch '0.9' into 1.0
2016-03-31 14:39:15 -03:00
Henrique Moody
7d978d64e3
Merge branch '0.8' into 0.9
2016-03-31 14:26:10 -03:00
Henrique Moody
eecc696792
Fix wrong date parsing on Date rule
...
The `DateTime::createFromFormat()` tries to guess the date too much and
sometimes wrong parsing may happen:
```php
echo DateTime::createFromFormat('Ym', '202309')->format('Ym');
```
The output of the above code is "202310", not "202309".
Using `date_parse_from_format()` we get a more precise parsing.
2016-03-31 14:18:22 -03:00
Emmerson
f40eb63d7b
Create "PhpLabel" rule
2016-03-04 21:48:25 -03:00
Henrique Moody
b1d0acc2e5
Fix some coding standards with php-cs-fixer
2016-03-04 21:42:27 -03:00
Henrique Moody
78449ce9b0
Merge branch '1.0'
2016-02-26 12:22:33 -03:00
Henrique Moody
4b2f159206
Merge branch '0.9' into 1.0
2016-02-26 12:21:26 -03:00
Henrique Moody
7febcf3dd6
Merge branch '0.8' into 0.9
2016-02-26 12:20:26 -03:00
Alasdair North
3bf4957caf
AbstractWrapper should pass on setName calls to the wrapped Validatable.
2016-02-26 12:18:05 -03:00
Samuel Heinzmann
ce3f885862
Create "Fibonacci" rule
2016-02-13 14:02:21 -02:00
Caio César Tavares
d1c3b2596e
Define names for the child of Not rule
2016-02-13 13:48:10 -02:00
Henrique Moody
c2eece6785
Create "IdentityCard" rule
...
Original-Author: Tomasz Regdos <tomek@regdos.com>.
2016-01-13 22:57:11 -02:00
Henrique Moody
0662db2a93
Improve tests for Pesel rule
...
Also increases validation on this rule.
2016-01-13 21:17:05 -02:00
Tomasz Regdos
b8da3a947b
Create "Pesel" rule
...
Create validator for PESEL - Polish Human Identification Number.
2015-12-17 11:25:57 -02:00
Guilherme Siani
c828420438
Create "Image" rule
2015-12-14 10:14:26 -02:00
Henrique Moody
799228a6e0
Merge branch '1.0'
2015-11-25 18:05:51 -02:00
Henrique Moody
b85ed687f2
Merge branch '0.9' into 1.0
2015-11-25 17:59:49 -02:00
Henrique Moody
d63cae970b
Merge branch '0.8' into 0.9
2015-11-25 17:54:31 -02:00
Tomasz Regdos
ecf4d5bb63
Fix PL postal code format
2015-11-25 17:44:59 -02:00
Emmerson
eae8ccb72a
Fix Age integration tests
2015-11-16 19:20:39 -03:00
William Espindola
ecbc5c0a94
Create integration tests for "Age" role
2015-11-09 06:54:51 -02:00
William Espindola
f2083a58d7
Create integration tests for "Bsn" rule
2015-11-09 06:54:43 -02:00
Henrique Moody
db8d8a04f5
Merge branch '1.0'
2015-11-06 12:27:25 -02:00
Henrique Moody
7aaa5c0a83
Merge branch '0.9' into 1.0
2015-11-06 12:25:14 -02:00
Henrique Moody
bf5c0bf132
Merge branch '0.8' into 0.9
2015-11-06 12:19:53 -02:00
Felipe Martins
e4622df22c
PerfectSquare rule check if the sqrt is an integer
2015-11-06 12:11:15 -02:00
Kennedy Tedesco
7d8b18baca
Making real tests for Exists
rule
2015-11-04 15:52:19 -02:00
Andrew Peters
08a5ab0d81
Use "{less/greater} than or equal to" phrasing
2015-11-04 15:37:43 -02:00
Emmerson
a0cc815add
Create AbstractRelated test
2015-11-04 15:34:49 -02:00
Emmerson
722ee22538
Create AbstractCtypeRule test
2015-11-04 15:34:49 -02:00
Emmerson
ff5a85fe06
Create AbstractSearcher test
2015-11-04 15:34:48 -02:00
Emmerson
2371e7c6db
Increase coverage of tests for AbstractComposite
2015-11-04 15:34:48 -02:00
Emmerson
6f77f8ac9b
Create AbstractFilterRule test
2015-11-04 15:34:48 -02:00
Emmerson
b7684b42f5
Create AbstractRegexRule test
2015-11-04 15:34:48 -02:00
Henrique Moody
7bc0cb94f3
Merge branch '1.0'
2015-11-04 15:17:55 -02:00
Henrique Moody
00c015c870
Merge branch '0.9' into 1.0
2015-11-04 15:16:26 -02:00
Henrique Moody
c521918fd0
Merge branch '0.8' into 0.9
2015-11-04 15:13:07 -02:00
Kennedy Tedesco
b98595a5c0
"MinimumAge" rule must accept any kind of integer
2015-11-04 15:08:10 -02:00
Henrique Moody
59669e6403
Set timezone for tests that work with dates
2015-11-04 14:59:04 -02:00
Henrique Moody
e6ba59185c
Merge branch '1.0'
2015-10-28 14:51:30 -02:00
Emmerson
58461766e4
Improvements on Each rule and test classes.
2015-10-28 14:50:53 -02:00
Emmerson
621b4707b5
Create "LanguageCode" rule
2015-10-26 23:12:21 -03:00
Henrique Moody
cd46545855
Small coding standards and docs improvements
2015-10-24 01:32:07 -02:00
Henrique Moody
474afaa2ec
Remove "ValidationExceptionInterface"
2015-10-23 09:00:31 -02:00
Henrique Moody
67e072ebd3
Remove "NestedValidationExceptionInterface"
2015-10-23 09:00:18 -02:00
Henrique Moody
04db93bdad
Remove prefix "Abstract" of non-abstract classes
2015-10-23 09:00:08 -02:00
Diego Oliveira
70997912eb
Create "Imei" rule
2015-10-23 07:53:59 -02:00
Alexandre Gaigalas
84fa389d4c
Implements numeric Key/KeyNested Addressing
...
The Key and KeyNested rules didn't supported numeric
addressing (e.g. `v::key(42);`). This change implements it and
adds new tests for the behavior.
2015-10-22 10:35:58 -02:00
Henrique Moody
19698d6a38
Move rule integration tests do another directory
2015-10-22 03:22:58 -02:00
Henrique Moody
8c9c587597
Improvements and fixes on exceptions
...
There were some cases when the exceptions was not displayed property
when using nested exception, this commit fix the problem and also
display messages in Markdown list.
2015-10-22 03:01:41 -02:00
Edson Lima
fd6fcd151e
Create integration tests for "AllOf" rule
2015-10-21 10:27:22 -02:00
Henrique Moody
03c0bd03de
Update message after changing exception properties
2015-10-21 04:14:11 -02:00
Emmerson
29bdb0a9f6
Create "BoolVal" rule
2015-10-21 01:35:05 -03:00
Edson Lima
a281ad03d7
Create integration tests for "Consonant" rule
2015-10-21 01:02:19 -02:00
Henrique Moody
e2b02b9777
Increase code coverage of rules
2015-10-19 14:17:47 -02:00
Emmerson
dddad80f48
Improvements on JSON rule
2015-10-19 11:57:42 -02:00
Danilo Correa
954c0ca133
Create integration tests for "Equals" rule
2015-10-18 19:11:58 -02:00
Guilherme Siani
1c254ab682
Refactor "ArrayVal" rule and add integration tests
2015-10-18 18:50:07 -02:00
João Torquato
f08a1fa9fc
Create "ArrayType" rule
2015-10-18 18:01:11 -02:00
Guilherme Siani
767fcaaccf
Create "Iterable" rule
2015-10-18 17:27:25 -02:00
Reginaldo Junior
7398588c56
Create "FloatType" rule
2015-10-18 16:57:49 -02:00
Henrique Moody
c84020f7f1
Set timezone for tests that work with dates
2015-10-18 16:22:46 -02:00
Henrique Moody
f0d249346f
Complete tests for "AbstractRule" class
2015-10-18 16:22:43 -02:00
Henrique Moody
4a0ca6d8b7
Remove unnecessary tests from "RuleTestCase" class
...
The tests of `assert()` and `check()` method must be done by the
`AbstractRuleTest` instead.
2015-10-18 15:36:47 -02:00
Henrique Moody
4964d561c4
Rename namespace of *TestCase classes
2015-10-18 14:50:59 -02:00
Justin Hook
4145faab39
Create "CurrencyCode" rule
2015-10-18 14:42:39 -02:00
João Torquato
a3694241f2
Create "Countable" rule
2015-10-18 11:37:50 -02:00
Henrique Moody
9c49dd3bcf
Use short array syntax
2015-10-17 22:56:32 -03:00
Rafael-BP
6fb15a697c
Create integration tests for "ObjectType" rule
2015-10-17 22:25:35 -03:00
Felipe Martins
cbbf082c15
Increase tests for "CountryCode" rule
...
- Add alpha-3 and numeric country codes and unit test for it
- Add new integration tests for CountryCode rule alpha-3 and numeric
2015-10-17 22:21:33 -03:00
Edson Lima
31f1f1c25e
Create integration tests for "Beetween" rule
2015-10-17 22:16:01 -03:00
Edson Lima
16ad8f804d
Create integration tests for "KeyValue" rule
2015-10-17 22:13:45 -03:00
Danilo Correa
5dc5410617
Crete integration tests for "BoolType" rule
2015-10-17 22:09:54 -03:00
Nawarian
85633cd8b0
Create integration tests for "Length" rule
2015-10-17 21:58:25 -03:00
Antonio Spinelli
c6638b9ffb
Create integration tests for "When" rule
2015-10-17 21:53:43 -03:00
Antonio Spinelli
b4a9253a03
Create RuleTestCase
...
It is a abstract test class to provide simple way to test rules and
create a mock rule.
2015-10-17 21:53:03 -03:00
William Espindola
c289b44fe9
Improve integration tests for "Yes" rule
2015-10-17 21:33:40 -03:00
Henrique Moody
59fe72794d
Remove integration tests for bank rule
2015-10-17 21:24:47 -03:00
Rogerio Prado de Jesus
b1a86e6065
Create integration tests for "Bank" rule
...
Thanks @gabriercouto and @marcelgsantos for all the words about how to
make it, you guys are amazing :-D.
2015-10-17 18:16:42 -03:00
Gabriel Rodrigues Couto
3c75524cba
Create integration tests for "Alpha" rule
2015-10-17 17:46:21 -03:00
Henrique Moody
87604434cf
Fix typo on "callableType_4.phpt" test
2015-10-17 17:33:27 -03:00
Rafael-BP
94e552d60c
Create integration tests for "CallableType" rule
2015-10-17 17:16:44 -03:00
Gabriel Rodrigues Couto
d56905aeba
Create Integration tests for "Numeric" rule
2015-10-17 17:10:47 -03:00
Reginaldo Junior
311bd1d762
Create integration tests for "CreditCard" rule
2015-10-17 17:06:18 -03:00
Danilo Correa
68b5cbe94a
Create integration tests for "Digit" rule
2015-10-17 17:02:46 -03:00
Emmerson
21c2b4361e
Creates integration tests for "Ip" rule
2015-10-17 17:00:11 -03:00
William Espindola
86f4822af3
Create integration test for "Bsn" rule
2015-10-17 16:54:10 -03:00
Marcel dos Santos
1e057c7687
Create integration tests for 'StringType' rule
2015-10-17 16:51:58 -03:00
Nawarian
ffd199d2b0
Refactoring unit tests of "Contains" rule
2015-10-17 16:48:17 -03:00
Felipe Martins
141103f085
Improve "CountryCode" rule
...
Add "alpha-3" and "numeric" country codes and unit test for it.
2015-10-17 16:42:43 -03:00
Guilherme Siani
fe17a2a6d8
Increase integration tests of "Alnum" rule
...
Created integration tests with extra functions of Alnum rule. Also
remove unecessary asserts from the AlnumTest.
2015-10-17 16:31:41 -03:00
Rafael-BP
4e894a7022
Create integration tests of "Optional" rule
2015-10-17 16:10:28 -03:00
Emmerson
24a65d712b
Refactor tests of "Cnpj" rule
2015-10-17 16:04:59 -03:00
Alexandre Gaigalas
9c03380f24
Adds partial test suite for AbstractRule
2015-10-17 16:02:12 -03:00
Gabriel Rodrigues Couto
503143a90b
Create integration tests for "NotEmpty" rule
2015-10-17 15:49:10 -03:00
Marcel dos Santos
8e6b5f5834
Refactor unit tests for "StringType" rule
2015-10-17 15:45:11 -03:00
Gabriel Rodrigues Couto
6ab3467d69
Create integration tests for "NullType" rule
2015-10-17 15:43:20 -03:00
Felipe Martins
08ce0fa455
Increase integration tests for "CountryCode" rule
2015-10-17 15:31:47 -03:00
Marcel dos Santos
669fd48e58
Create integration tests for "Slug" rule
2015-10-17 15:30:07 -03:00
Paulo Eduardo
0526c14cc9
Create integration tests for "Tld" rule
2015-10-17 15:26:09 -03:00
Guilherme Siani
780cedbec3
Created integration tests for "Alnum" rule
2015-10-17 15:22:08 -03:00
Nawarian Nickolas
b8f2f03289
Refactor tests of "Length" rule
2015-10-17 15:09:48 -03:00
Rafael-BP
e3a18c6665
Increase tests for "NotOptional" rule
2015-10-17 15:03:03 -03:00
João Torquato
cbb0fa74a5
Create integration tests for "MinimumAge" rule
2015-10-17 15:01:21 -03:00
Danilo Correa
2aa368b8c8
Create integration tests from "CNPJ" rule
2015-10-17 14:43:56 -03:00
Gabriel Rodrigues Couto
142486bfcc
Create integration tests for "NotBlank" rules
2015-10-17 14:26:58 -03:00
William Espindola
ae1dfe6a66
Create integration test for "Yes" rule
2015-10-17 14:24:15 -03:00
Paulo Eduardo
aa13468d04
Refactor test of "Bsn" rule
...
- Remove Dead Code
- Increase Code Coverage
2015-10-17 14:20:45 -03:00
Edson Lima
2f0db5ebff
Create integration tests for "Email" rule
2015-10-17 14:18:33 -03:00
Marcel dos Santos
c9bd83f111
Refactor unit tests for "Slug" rule
2015-10-17 14:11:54 -03:00
Paulo Eduardo
2ac90907e7
Create unit tests for "AlwaysValid" rule
2015-10-17 14:03:03 -03:00
Felipe Martins
a30b730969
Add unit test for "CountryCode" rule
2015-10-17 13:58:25 -03:00
Paulo Eduardo
196ab887e5
Add unit tests for "Tld" rule
2015-10-17 13:55:25 -03:00
Henrique Moody
ac8fb50400
Create integration tests from "CPF" rule
2015-10-17 12:40:39 -03:00
Alexandre Gaigalas
a0e4cfa1e2
Fixes MimeTypeTest Expected Exception Path
...
Previously, the MimeTypeTest was matching UNIX-style file slashes
in its PHPUnit Expected Exception. This change fixes it to
ignore the slash and match only the file name and pass on Windows
platforms as well.
2015-10-17 11:17:32 -03:00
Henrique Moody
60568eac62
Create "IntType" rule
2015-10-16 23:43:01 -03:00
Ronald Drenth
8cab57052e
Create "Bsn" rule
2015-10-16 22:19:33 +02:00
Henrique Moody
d53811f7b7
Remove user-defined optional values
...
Since we have NotOptional rule now, we must keep the same opposite
behaviour between these two rules.
This commit also improve and increase tests from Optional rule and
updates the documentation.
No tests was made for messages on MODE_DEFAULT because it's not possible
for a while since we don't have such much granularity control, but after
some fixes on Not rule, maybe we will be able to do that, that's why I
kept the messages on OptionalException.
2015-10-15 11:14:20 -03:00
Henrique Moody
15b0a937b2
Create "NotOptional" rule
2015-10-15 10:36:48 -03:00
Henrique Moody
6f9a5771c2
Fix "Not" rule on first level
2015-10-14 13:56:29 -03:00
Henrique Moody
62761ffe18
Make all rules inclusive by default
2015-10-14 13:10:20 -03:00
Henrique Moody
bbf9c2505e
Remove all rules shortcuts
2015-10-14 13:06:36 -03:00
Henrique Moody
880cdb5f09
Create "NotBlank" rule
2015-10-14 01:05:42 -03:00
Henrique Moody
b28e97c70f
Create "Identical" rule
2015-10-13 13:29:34 -03:00
Henrique Moody
641b169c1b
Remove identical checking from "Equals" rule
2015-10-13 13:29:31 -03:00
Henrique Moody
5a9f1fe508
Create "KeyValue" rule
2015-10-13 07:37:12 -03:00
Ivan Zinovyev
91e9c2053d
Create "KeyNested" rule
2015-10-07 14:03:19 -03:00
Henrique Moody
1931da7570
Rename rule "Scalar" to "ScalarVal"
2015-10-07 12:44:20 -03:00
Henrique Moody
88865267d9
Rename rule "Resource" to "ResourceType"
2015-10-07 12:44:19 -03:00
Henrique Moody
598bfa2843
Rename rule "Object" to "ObjectType"
2015-10-07 12:44:19 -03:00
Henrique Moody
5941c2ce50
Rename rule "NullValue" to "NullType"
2015-10-07 12:44:13 -03:00
Henrique Moody
5863903e48
Rename rule "Arr" to "ArrayVal"
2015-10-07 12:25:15 -03:00
Henrique Moody
255269bfb3
Rename rule "String" to "StringType"
2015-10-07 11:52:03 -03:00
Henrique Moody
9b85df4601
Rename rule "Int" to "IntVal"
2015-10-07 11:46:57 -03:00
Henrique Moody
3e1f86baf8
Rename rule "Float" to "FloatVal"
2015-10-07 11:42:37 -03:00
Henrique Moody
7f2cdceb31
Rename rule "True" to "TrueVal"
2015-10-07 11:38:24 -03:00
Henrique Moody
fef01d7e09
Rename rule "False" to "FalseVal"
2015-10-07 11:36:31 -03:00
Henrique Moody
0ae5d25de7
Rename rule "Bool" to "BoolType"
2015-10-07 11:30:29 -03:00
Henrique Moody
937fa6b183
Create documentation for message localization
...
Also define the `translator` param to the related rules in
`AbstractNestedException`.
2015-10-07 10:18:31 -03:00
Henrique Moody
455ff9b318
Create "Optional" rule
2015-10-07 02:44:33 -03:00
Henrique Moody
3e45647b81
Make all rules mandatory
2015-10-07 01:00:39 -03:00
Henrique Moody
3fbc45d44f
Add country code to postal code exception message
2015-09-24 00:49:25 -03:00
Henrique Moody
9ab672d489
Fix bugs on "SubdivisionCode" rule
...
The last commit was a cherry-pick from a long time ago, so the test was
into a different repository which could not be seen by PHPUnit. I moved
the tests and them I could see that the rule had some bugs and wrong
exception messages.
2015-09-22 10:08:17 -03:00
Henrique Moody
6c9a0e7228
Create "SubdivisionCode" rule
2015-09-21 13:54:02 -03:00
Ricardo Gobbo
a026124590
Create "VideoUrl" rule
2015-09-15 23:41:24 -03:00
Henrique Moody
13454e3f6a
Use filter_var()
on "True" and "False" rules
2015-09-11 14:20:46 -03:00
Henrique Moody
62d8909928
Some small coding standard fixes
2015-09-11 02:59:11 -03:00
Henrique Moody
5a41a6bf0c
Make exception messages simpler
...
When the exception has only one related exception, there is no need to
display it's messages unless it has an user-defined template.
2015-09-11 02:49:42 -03:00
Henrique Moody
69f433db6b
Create method getMessages()
on nested exception
2015-09-10 19:20:31 -03:00
David Meister
f14e53921c
Create "Factor" rule
2015-09-10 13:44:00 -03:00
Henrique Moody
748b280c34
Update conversion to strings on exceptions
...
Many changes were made on `ValidationException::stringify`:
- Add support for instances of `Exception`;
- Add support for instances of `Traversable`;
- Add support for resources;
- Improve `Array` conversion;
- Improve `Object` conversion;
- Improve conversion of all values by using JSON.
Now, all the parameters of the exception classes are just converted to
string when replacing parameters on exceptions, so the exception classes
now keep the original value of all parameters.
2015-09-04 17:11:40 -03:00
Henrique Moody
c4e6f0875e
Create test for Not
rule with recursion
2015-09-04 15:24:03 -03:00
Henrique Moody
8faed71a05
The finfo::file() accepts only valid files
2015-08-26 19:46:51 -03:00
Henrique Moody
77b046f907
Create "CallableType" rule
2015-08-20 01:29:00 -03:00
Henrique Moody
ea71de5812
Create "Scalar" rule
2015-08-20 01:28:59 -03:00
Henrique Moody
954c257fc9
Create "Resource" rule
2015-08-20 01:28:59 -03:00
Henrique Moody
a7aa5f8ec0
Create "Infinite" rule
2015-08-20 01:28:59 -03:00
Henrique Moody
c80ed1bb85
Create "Finite" rule
2015-08-20 01:28:56 -03:00
Henrique Moody
75b406c240
Missing @group rule
on locale rules
2015-08-16 15:07:15 -03:00
Henrique Moody
757c3776af
Add @covers
and @group rule
on rule tests
2015-08-16 15:00:05 -03:00
Andy Wendt
007e37b570
Removed all deprecated rules
...
Also their exceptions and tests. Removed the class names from the
`$deprecateds[]` in `CheckExceptionsTest`.
2015-08-13 04:40:17 -03:00
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
Marcel Voigt
2de6e0136c
Stringify recursively with maximum depth
2015-08-09 12:27:00 -03:00
Henrique Moody
743fafb31b
Create PHPT tests from AbstractNestedExceptionTest
2015-07-29 17:08:06 -03:00
Henrique Moody
4037209302
Move some tests from ValidatorTest to PHPT files
...
- setTemplate() with single validator should use template as main
message
- setTemplate() with multiple validators should use template as main
message
- setTemplate() with multiple validators should use template as full
message
- getFullMessage() should include all validation messages in a chain
- not() should work by builder
- countryCode()
- alwaysValid()
- alwaysInvalid()
- Issue #85 : findMessages() should not trigger catchable fatal error
- keys as validator names
- Do not rely on nested validation exception interface for check
2015-07-29 01:19:00 -03:00
Henrique Moody
7d9d19009a
Create KeySet rule
2015-07-21 12:35:44 -03:00
Henrique Moody
a0382f7af4
Update some files permissions
...
Some files were defined as executable but they should not be
2015-07-21 11:22:33 -03:00
Henrique Moody
a69d6126ee
Merge pull request #365 from henriquemoody/name
...
AbstractRelated should set names for child rule
2015-07-16 10:08:38 -03:00
Augusto Pascutti
f7b80469a1
Prevents vim swap files to be found as rules
...
Exception testing searched for all files inside the rules directory and
tried to come up with a class name to it. VIM swap files always start
with a dot (since they are hidden files) and fail to be a valid class
name, provoking an error while testing.
Redesign the tests to use that "rule list" as a data provider instead
of being an algorithmn inside a test. Getting rid of the iteration inside
the test we can test all exception properties more easily while being
able to fail just one specific test (for an especific exception rule)
instead of preventing any more tests on exceptions from being executed.
While the test has fewer lines now, coverage and asserts are the same as
before.
2015-07-12 21:13:28 -03:00
Henrique Moody
7f8815e7ea
AbstractRelated should set names for child rule
2015-06-30 10:38:19 -03:00
Henrique Moody
fb742375b4
Create "Mimetype" rule
2015-06-18 23:08:01 -03:00
Henrique Moody
96f4fc2e6f
Create "Extension" rule
...
Updates required PHP version to 5.3.6 since SplFileInfo::getExtension()
was created on this version.
2015-06-18 23:07:50 -03:00
Henrique Moody
cc6da3a2e4
Create "Size" rule
2015-06-18 23:07:22 -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
Henrique Moody
d0f36de3bd
Merge branch '0.8' into 0.9
2015-05-28 11:29:15 -03:00
Henrique Moody
fa265e3edf
Fix wrong behaviour on JSON rule
...
It was not considering values like `false`, `null`, `[]` or `{}`.
2015-05-28 11:02:07 -03:00
Augusto Pascutti
fc08c96971
Prevents noWithespace failing with arrays
...
A warning was thrown because of the preg_match call, as not every input
is a string we prevent calls from arrays going further into checking.
Issue 346
2015-05-06 00:06:26 -03:00
Augusto Pascutti
84dec918d1
Prevents noWithespace failing with arrays
...
A warning was thrown because of the preg_match call, as not every input
is a string we prevent calls from arrays going further into checking.
Issue 346
2015-05-06 00:06:09 -03:00
Henrique Moody
cf4ec32481
Remove "Country" rule
2015-04-24 19:26:49 -03:00
Henrique Moody
1b757b3852
Merge branch '0.8'
2015-04-24 19:20:09 -03:00
Henrique Moody
0e9044de81
Merge branch '0.7' into 0.8
2015-04-24 19:19:42 -03:00
qrazi
b4bb681fd3
The creation of a DateTime-object from the input-string keeps the given
...
timezone information. However, in the comparison the DateTime-object is
first output to a timestamp, which is then converted to a string with the
date()-function. But because a timestamp does not include timezone
information, date() will assume the system's timezone. So if the system
timezone set in the PHP settings is UTC, a string with another timezone,
e.g. 2015-04-24T21:11:00+02:00, will fail to be validated. The result from
the date()-function in this example is 2015-04-24T19:11:00+00:00, which is
a different string then the input.
The DateTime-class has also an option to create a string from a format,
DateTime->format(). So it is possible to skip the use of the
date()-function with the added benefit that using format() does have
access to the timezone information and thus produces the expected
2015-04-24T21:11:00+02:00 to compare with the given input.
This commit changes the Rule to accommodate this and expands the tests. If
these added tests are run before applying the fix to the Date-rule, the
tests will fail.
2015-04-24 23:03:45 +02:00
Henrique Moody
d728061c45
Create "Country" rule
2015-04-23 14:12:53 -03:00
Henrique Moody
ec6eb82a00
Merge branch '0.8'
2015-04-17 00:04:02 -03:00
Henrique Moody
8ca24c2f84
Merge branch '0.7' into 0.8
2015-04-17 00:03:36 -03:00
Henrique Moody
0b6c5273e4
Fix wrong behaviour on Not rule
2015-04-16 23:45:17 -03:00
Henrique Moody
7c39c7645e
Merge branch '0.8'
2015-04-16 23:32:43 -03:00
Henrique Moody
88f2ac465c
Merge branch '0.7' into 0.8
2015-04-16 23:32:09 -03:00
Henrique Moody
c63d967179
Fix PHPUnit tests on HHVM
2015-04-16 20:01:15 -03:00
Henrique Moody
4ee11a7c19
Merge branch '0.8'
2015-04-16 14:02:47 -03:00
Henrique Moody
f8fb86df45
Merge branch '0.7' into 0.8
2015-04-16 13:57:51 -03:00
Andreas Wolf
8ba31398fd
Make AlwaysInvalid::assert('') fail
...
Resolves #326
2015-04-16 13:56:27 -03:00
Henrique Moody
0b7b24a3cf
Merge branch '0.8'
2015-03-02 14:06:36 -03:00
Henrique Moody
c385684249
Merge branch '0.7' into 0.8
2015-03-02 14:05:46 -03:00
Henrique Moody
acea4cd583
Update REGEX for postal code of "GB" country
2015-03-02 13:58:24 -03:00
Eduardo Gulias Davis
13c3c92ae6
Use "egulias/emailvalidator" for email validation
2015-03-01 21:10:30 -03:00
Henrique Moody
63d5fb1ee4
Add PHP 7 to Travis builds
...
Fix wrong octal notation in "HexRgbColor" test case
2015-02-26 17:55:51 -03:00
Henrique Moody
fa67f0b030
Merge branch '0.8'
2015-02-20 10:37:13 -02:00
Henrique Moody
472be85d41
Merge branch '0.7' into 0.8
2015-02-20 10:36:47 -02:00
Henrique Moody
ab8ba09b14
Fix wrong behavior on AbstractRelated class
...
The wrong behavior was that any key with `''` was considered as true
even when the validator was/had NotEmpty rule.
2015-02-20 10:27:36 -02:00
Henrique Moody
db0f71575f
Create "Age" rule
...
Also add a deprecation note in "MinimumAge" rule documentation.
2015-02-19 19:38:16 -02:00
Henrique Moody
378e114c33
Merge branch '0.7' into 0.8
2015-02-13 09:33:57 -02:00
Alexandre Gaigalas
1b1689bdea
AbstractRelated is accepts '' as valid by default
2015-02-13 09:22:18 -02:00
Henrique Moody
2914eba595
Merge pull request #176 from henriquemoody/namespace
...
Allow to define custom rule's namespaces/prefixes.
2015-02-11 12:43:59 -02:00
Henrique Moody
a4cb20810d
Create a Factory to create rules
...
It also provide a way to define namespaces/prefixes to use the custom
rules on Respect\Validation.
2015-02-11 11:35:19 -02:00
Henrique Moody
d6855c0722
Improve date and time handling on "Max" rule
2015-02-11 11:18:39 -02:00
Henrique Moody
e91d0ef22e
Improve date and time handling on "Min" rule
2015-02-11 11:18:39 -02:00
Henrique Moody
fd3fb80b8b
Merge branch '0.7'
2015-02-05 14:40:20 -02:00
Henrique Moody
29d3fcc1bd
Required improvements on "PostalCode" rule
...
- Turn rule case insensitive
- Use default pattern for countries who doesn't have postal code
2015-02-05 13:59:50 -02:00
Henrique Moody
210d7a4834
Merge pull request #281 from AndyWendt/fix/phpunit-mocking-exceptions-in-hhvm
...
Replaced phpunit mocks of exceptions with concretions to fix hhvm issue
2015-02-04 06:33:04 -02:00
Henrique Moody
d0f07ecc5f
Mock malkusch\bav\BAV
on tests
2015-02-03 13:52:22 -02: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
Henrique Moody
4c4c3d4c25
Create "Type" rule
2015-02-02 16:43:14 -02: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
e20ddce185
Create "Url" rule
2015-01-27 10:43:00 -02:00
Henrique Moody
a0e7e834fb
Create "FilterVar" rule
2015-01-26 11:25:26 -02:00
Henrique Moody
81cfba9a6c
Merge pull request #247 from henriquemoody/when
...
Allow to use `when()` rule without else
2015-01-23 02:53:21 -02:00
Henrique Moody
8b369fae97
Create "False" rule
2015-01-23 02:46:18 -02:00
Henrique Moody
dfcd4b2a20
Create "True" rule
2015-01-23 02:46:07 -02:00
Henrique Moody
57d82ce029
Merge branch '0.7'
2015-01-19 21:09:47 -02:00
Henrique Moody
fb54341fb2
Fix wrong behavior when calling not()
rule
2015-01-19 20:22:58 -02:00
Henrique Moody
35588c5340
Allow to use when()
rule without else
2015-01-19 12:10:50 -02:00
Henrique Moody
eb3b8313aa
Move tests files
2015-01-19 11:01:00 -02:00
Henrique Moody
16005ae9d4
Refactoring on banking rules
2015-01-18 13:39:41 -02:00
Henrique Moody
4f74d2940c
Create locale factory class
2015-01-18 13:39:41 -02:00
Henrique Moody
67fe0b6443
Create german bank rules
2015-01-18 13:39:41 -02:00
Henrique Moody
c2f3f162fe
Create AbstractWrapper class
2015-01-18 12:33:29 -02:00
Henrique Moody
bb2664e0e4
Merge pull request #252 from henriquemoody/unit-tests
...
Remove unnecessary checkings on unit tests
2015-01-18 12:33:13 -02:00
Henrique Moody
8b6701facf
Remove unused file
2015-01-17 17:24:41 -02:00
Henrique Moody
b0816ab36f
Remove unnecessary checkings on unit tests
...
Since we are using only composer as autoloader and we have all
dependencies on `require-dev` there is no need to check if third-party
libraries are present or not
2015-01-17 17:04:05 -02:00
Henrique Moody
3add4de055
Fix some standards on bank rules
2015-01-17 13:00:18 -02:00
Henrique Moody
f2285f6b53
Improve tests of banking rules
2015-01-17 12:23:46 -02:00
Henrique Moody
26e8d76d8c
Merge branch '0.7'
2015-01-14 20:02:11 -02:00
Alexandre Gaigalas
a8d1c94962
Remove support for undocumented baseXX() shortcut
...
Previously undocumented, this feature is now removed to improve
each chain call.
2015-01-14 19:27:06 -02:00
Alexandre Gaigalas
ecd2cc9931
Update PrntTest to use chr() as provider argument
...
On Windows machines, \t produces a pritable character, thus making
the tests incompatible between systems.
2015-01-14 19:23:52 -02:00
Markus Malkusch
623a26235e
Added bank(), bankAccount() and bic(). Currently only German.
2015-01-14 21:17:04 +01:00
Henrique Moody
2b97bbba22
Update PHPUnit settings
...
- Move "tests/phpunit.xml" to "phpunit.xml.dist"
- Update documentation and contributing documents
- Update Travis settings
- Add "phpunit.xml" in the Git ignore list
2015-01-07 16:02:58 -02:00
Henrique Moody
b5d3ff63ee
Create Yes/No rules
2015-01-06 20:46:16 -02:00
davidepastore
960732d26c
Create HexRgbColor rule
2015-01-06 13:42:53 -02:00
Henrique Moody
3e89ee385f
Always define names for children in composite rules
2015-01-05 12:47:32 -02:00
Henrique Moody
ba064eb400
Merge pull request #231 from henriquemoody/setName
...
Define names for children in composite rules
2015-01-03 14:40:28 -02:00
Henrique Moody
e836b22210
Define names for children in composite rules
2015-01-03 14:18:20 -02:00