[BUGFIX] Correctly apply Extbase-validator-options / Add tests 10/24010/7
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Tue, 24 Sep 2013 00:12:03 +0000 (02:12 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 11 Nov 2013 17:12:57 +0000 (18:12 +0100)
commit742a5dff0acc5c931793396421076ff2fc22edda
treefca6365ef5ec4261fa2dc650548d3108662da2cb
parente305cbe578844e23e26d09f652548c7ed8af288d
[BUGFIX] Correctly apply Extbase-validator-options / Add tests

* Check supplied options
* Apply default-values of validator if needed
* Check for required options
* Provide options via constructor instead of via setOptions()
  (which is deprecated)
* Add tests for AbstractValidator and AbstractCompositeValidator

Change-Id: I02c72eff93125a002d57e23710b954c44cc84465
Resolves: #52208
Releases: 6.0, 6.1, 6.2
Reviewed-on: https://review.typo3.org/24010
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Pascal Dürsteler
Tested-by: Pascal Dürsteler
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
18 files changed:
typo3/sysext/extbase/Classes/Validation/Validator/AbstractValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/BooleanValidator.php
typo3/sysext/extbase/Classes/Validation/ValidatorResolver.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/AbstractCompositeValidatorTest.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Unit/Validation/Validator/AbstractValidatorTest.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Unit/Validation/Validator/AbstractValidatorTestcase.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/AlphanumericValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/EmailAddressValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/Fixture/AbstractCompositeValidatorClass.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Unit/Validation/Validator/Fixture/AbstractValidatorClass.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Unit/Validation/Validator/FloatValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/GenericObjectValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/IntegerValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/NotEmptyValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/StringLengthValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/StringValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/TextValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/ValidatorResolverTest.php