10067[FEATURE] Add several testcases for validators
Commit message
Review
-
Code review CR +2
- Andreas Wolf +2
-
Verified V +2
- Andreas Wolf +2
Issues 1
Files 23
- typo3/sysext/form/Classes/Validation/AbstractValidator.php+11 −1
- typo3/sysext/form/Classes/Validation/AlphabeticValidator.php+1 −1
- typo3/sysext/form/Tests/Unit/Validation/AlphabeticValidatorTest.phpnew+161 −0
- typo3/sysext/form/Tests/Unit/Validation/AlphanumericValidatorTest.phpnew+160 −0
- typo3/sysext/form/Tests/Unit/Validation/BetweenValidatorTest.phpnew+166 −0
- typo3/sysext/form/Tests/Unit/Validation/DateValidatorTest.phpnew+104 −0
- typo3/sysext/form/Tests/Unit/Validation/DigitValidatorTest.phpnew+100 −0
- typo3/sysext/form/Tests/Unit/Validation/EmailValidatorTest.phpnew+101 −0
- typo3/sysext/form/Tests/Unit/Validation/EqualsValidatorTest.phpnew+79 −0
- typo3/sysext/form/Tests/Unit/Validation/FileAllowedTypesValidatorTest.phpnew+102 −0
- typo3/sysext/form/Tests/Unit/Validation/FileMaximumSizeValidatorTest.phpnew+101 −0
- typo3/sysext/form/Tests/Unit/Validation/FileMinimumSizeValidatorTest.phpnew+100 −0
- typo3/sysext/form/Tests/Unit/Validation/FloatValidatorTest.phpnew+77 −0
- typo3/sysext/form/Tests/Unit/Validation/GreaterThanValidatorTest.phpnew+101 −0
- typo3/sysext/form/Tests/Unit/Validation/Helper.phpnew+86 −0
- typo3/sysext/form/Tests/Unit/Validation/InArrayValidatorTest.phpnew+136 −0
- typo3/sysext/form/Tests/Unit/Validation/IntegerValidatorTest.phpnew+101 −0
- typo3/sysext/form/Tests/Unit/Validation/IpValidatorTest.phpnew+103 −0
- typo3/sysext/form/Tests/Unit/Validation/LengthValidatorTest.phpnew+106 −0
- typo3/sysext/form/Tests/Unit/Validation/LessThanValidatorTest.phpnew+101 −0
Review log 36
Show 11 earlier messages
-
Andreas Wolf commented on patch set 2 10/10/12, 11:18
Fails; Do not submit There are quite some failing tests in this; in addition, some fixtures are created without the required $arguments array. I feel that we should first fix some issues in EXT:form and then proceed with this patch. -
Oliver Klee commented on patch set 2 10/10/12, 11:18
(2 inline comments)DateTest.php:59I propose adding keys with good names to the outer array in all data provides. (The keys will be displayed when the tests are run in the PHPUnit BE module.)FileallowedtypesTest.php:69I propose changing all tests to have two data providers: One for valid values and one for invalid data providers. This would allow us to simplify the tests and to also have more descriptive namings: isValidForValidValueReturnsTrue etc.FloatTest.php:63typo: ProBiderHelper.php:51This won't work because using the "with" method does not allow several different "with" parameters. I'll refactor this.UriTest.php:6trailing whitespace (in all files) -
Oliver Klee commented on patch set 2 10/10/12, 11:18
(1 inline comment) -
Andreas Lappe uploaded patch set 2 10/10/12, 11:18
Helper.php:67Should this be rewritten to only have one return statement?Helper.php:68ReplyDoneInarrayTest.php:48Here I already initialize the fixture in strict-mode, making the tests below useless and leaving the non-strict-mode untested… I fixed it in patchset 5. -
Oliver Klee commented on patch set 3 10/10/12, 11:18
I'll upload an updated patch in a minute: We don't need the $expected parameter anymore. -
Oliver Klee commented on patch set 3 10/10/12, 11:18
I've entered issue #35333 for the failing unit tests. -
Oliver Klee commented on patch set 3 10/10/12, 11:18
Actually, for the Green Bar Feeling (TM), the Core tests should be green at all times (and if they are not, this needs to be fixed as quickly as possible). No patch must break any unit tests. If new unit tests expose a bug, those new tests (that fail without a corresponding fix) should be part of the patch with the fix, serving as regression tests. -
Oliver Klee commented on patch set 3 10/10/12, 11:18
#35753. Sorry. -
Oliver Klee commented on patch set 3 10/10/12, 11:18
I'll fix the missing array constructor parameter issue in my reworked changeset and drop (or fix) any failing test. I'll then enter an issue on forge about the bugs that have been discovered by these tests. -
Oliver Klee commented on patch set 3 10/10/12, 11:18
(1 inline comment) -
Oliver Klee commented on patch set 3 1 comment 10/10/12, 11:18
I would prefer that you didn't submit this
-
Oliver Klee commented on patch set 4 10/10/12, 11:18
Andreas (Wolf), care to remove your -2? -
Oliver Klee uploaded patch set 4 10/10/12, 11:18
-
Oliver Klee commented on patch set 4 10/10/12, 11:18
Verified; Looks good to me, but someone else must approve -
Andreas Lappe uploaded patch set 3 10/10/12, 11:18
-
Andreas Lappe commented on patch set 3 10/10/12, 11:18
@Andreas Wolf: As quite a lot of this stuff is not documented, my goal was to document it with tests as a first step and to understand some of the issues I had. I'm not sure if all tests have to pass for a patch to be accepted, but I think it documents the quirks of the current code: "http://mac.local/" is not a valid URL or "myemail@myhostname" is a valid email. I thought this could then lead to one or more follow-up patches to make the tests pass. -
Andreas Lappe commented on patch set 4 10/10/12, 11:18
(1 inline comment) -
Andreas Wolf uploaded patch set 6 10/10/12, 11:18
-
Andreas Wolf commented on patch set 6 V 0 10/10/12, 11:18
by team member; Looks good to me, approved Namespaced this patch and did several minor adjustments. -
Oliver Klee commented on patch set 5 10/10/12, 11:18
(1 inline comment) -
Oliver Klee commented on patch set 5 10/10/12, 11:18
Verified; Looks good to me, but someone else must approve -
Oliver Klee commented on patch set 5 10/10/12, 11:18
(1 inline comment) -
Andreas Lappe commented on patch set 5 10/10/12, 11:18
(1 inline comment) -
Andreas Lappe uploaded patch set 5 10/10/12, 11:18
-
Andreas Lappe commented on patch set 5 1 comment 10/10/12, 11:18
Verified; Looks good to me, but someone else must approve -
Philipp Gampe commented on patch set 5 V 0 10/10/12, 11:18
See comment.Abstract.php:108This one needs one parameter. Once I set the parameter to '', it starts working. Is this related to this patch or another bug?Abstract.php:108ReplyYes, I fails for almost all test and just produces a warning instead of the test. I create a new issue.Abstract.php:108ReplyActually, this makes a tests fail: https://review.typo3.org/#/c/10206/ -
Philipp Gampe commented on patch set 5 10/10/12, 11:18
(1 inline comment) -
Philipp Gampe commented on patch set 5 10/10/12, 11:18
(1 inline comment) -
Mr. Jenkins commented on patch set 1 10/10/12, 11:18
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/3688/ : SUCCESS -
Mr. Jenkins commented on patch set 2 10/10/12, 11:18
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/3697/ : SUCCESS -
Mr. Jenkins commented on patch set 3 10/10/12, 11:18
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/3720/ : SUCCESS -
Mr. Jenkins commented on patch set 4 10/10/12, 11:18
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/3722/ : SUCCESS -
Mr. Jenkins commented on patch set 5 10/10/12, 11:18
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/3723/ : SUCCESS -
Mr. Jenkins commented on patch set 6 10/10/12, 11:18
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/6243/ : SUCCESS -
Wouter Wolters commented on patch set 1 10/10/12, 11:18
Thanks for the patch. For features the line "Related: #35333" needs to be "Resolves: #35333". And a line "Releases: 6.0" is missing. See for the guidelines http://wiki.typo3.org/CommitMessage_Format_(Git) -
Andreas Wolf merged patch set 6 10/10/12, 11:18