Review main Merged

10067[FEATURE] Add several testcases for validators

Andreas Lappe CR +2 V +2 Expert +2298 −2 updated 06/03/13, 20:49

Commit message

This adds several testcases for the provided validators.

Review

  • Code review CR +2
    • Andreas Wolf +2
  • Verified V +2
    • Andreas Wolf +2

Issues 1

Files 23

Show 3 more files

Review log 36

Show 11 earlier messages
  1. 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.
  2. Oliver Klee commented on patch set 2 10/10/12, 11:18

    (2 inline comments)

    DateTest.php:59

    I 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:69

    I 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:63

    typo: ProBider

    Helper.php:51

    This won't work because using the "with" method does not allow several different "with" parameters. I'll refactor this.

    UriTest.php:6

    trailing whitespace (in all files)
  3. Oliver Klee commented on patch set 2 10/10/12, 11:18

    (1 inline comment)
  4. Andreas Lappe uploaded patch set 2 10/10/12, 11:18

    Helper.php:67

    Should this be rewritten to only have one return statement?

    Helper.php:68 Reply

    Done

    InarrayTest.php:48

    Here 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.
  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.
  6. Oliver Klee commented on patch set 3 10/10/12, 11:18

    I've entered issue #35333 for the failing unit tests.
  7. 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.
  8. Oliver Klee commented on patch set 3 10/10/12, 11:18

    #35753. Sorry.
  9. 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.
  10. Oliver Klee commented on patch set 3 10/10/12, 11:18

    (1 inline comment)
  11. Oliver Klee commented on patch set 3 1 comment 10/10/12, 11:18

    I would prefer that you didn't submit this
  1. Oliver Klee commented on patch set 4 10/10/12, 11:18

    Andreas (Wolf), care to remove your -2?
  2. Oliver Klee uploaded patch set 4 10/10/12, 11:18

  3. Oliver Klee commented on patch set 4 10/10/12, 11:18

    Verified; Looks good to me, but someone else must approve
  4. Andreas Lappe uploaded patch set 3 10/10/12, 11:18

  5. 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.
  6. Andreas Lappe commented on patch set 4 10/10/12, 11:18

    (1 inline comment)
  7. Andreas Wolf uploaded patch set 6 10/10/12, 11:18

  8. 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.
  9. Oliver Klee commented on patch set 5 10/10/12, 11:18

    (1 inline comment)
  10. Oliver Klee commented on patch set 5 10/10/12, 11:18

    Verified; Looks good to me, but someone else must approve
  11. Oliver Klee commented on patch set 5 10/10/12, 11:18

    (1 inline comment)
  12. Andreas Lappe commented on patch set 5 10/10/12, 11:18

    (1 inline comment)
  13. Andreas Lappe uploaded patch set 5 10/10/12, 11:18

  14. Andreas Lappe commented on patch set 5 1 comment 10/10/12, 11:18

    Verified; Looks good to me, but someone else must approve
  15. Philipp Gampe commented on patch set 5 V 0 10/10/12, 11:18

    See comment.

    Abstract.php:108

    This one needs one parameter. Once I set the parameter to '', it starts working. Is this related to this patch or another bug?

    Abstract.php:108 Reply

    Yes, I fails for almost all test and just produces a warning instead of the test. I create a new issue.

    Abstract.php:108 Reply

    Actually, this makes a tests fail: https://review.typo3.org/#/c/10206/
  16. Philipp Gampe commented on patch set 5 10/10/12, 11:18

    (1 inline comment)
  17. Philipp Gampe commented on patch set 5 10/10/12, 11:18

    (1 inline comment)
  18. Mr. Jenkins commented on patch set 1 10/10/12, 11:18

  19. Mr. Jenkins commented on patch set 2 10/10/12, 11:18

  20. Mr. Jenkins commented on patch set 3 10/10/12, 11:18

  21. Mr. Jenkins commented on patch set 4 10/10/12, 11:18

  22. Mr. Jenkins commented on patch set 5 10/10/12, 11:18

  23. Mr. Jenkins commented on patch set 6 10/10/12, 11:18

  24. 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)
  25. Andreas Wolf merged patch set 6 10/10/12, 11:18