Review main Merged

29584[TASK] Update to phpunit 4.1

Christian Kuhn CR +2 V +2 Hard +533 −109 updated 05/12/14, 15:04

Commit message

Do not forget to "composer update" test instances!

Updating from phpunit 3.7 to 4.1 is smooth, except two details:

* The mock framework dropped staticExpects, two test cases must
  be refactored to circumvent this.

* The mocker now tries to resolve method argument type hints, so
  those classes must exist and autoloaded, some FLOW dependencies
  are affected here.

Review

  • Code review CR +2
    • Helmut Hummel +2
    • Markus Klein +1
    • Tymoteusz Motylewski +1
  • Verified V +2
    • Helmut Hummel +2
    • Markus Klein +1
    • Tymoteusz Motylewski +1

Issues 1

Files 8

Review log 25

  1. Mr. Jenkins commented on patch set 1 04/20/14, 13:08

  2. Helmut Hummel commented on patch set 1 04/20/14, 15:49

    ext_autoload.php:16

    Not sure about the logger, but the bootstrap class is aliased to the TYPO3 CMS bootstrap (in getInstance). Not sure what the effect is, if we also require the class here.
  3. Markus Klein commented on patch set 1 04/22/14, 08:00

    Why do you add the flow classes at all? Don't see where they are necessary, what do I miss?
  4. Christian Kuhn commented on patch set 1 04/22/14, 18:22

    i'm adding them, because with phpunit the mocker changed a bit and now analyses parameter arguments. if they are classes, it searches for them and throws exceptions if such a class can not be found. in effect some tests failed which was solved by adding those classes that are referenced in Package and PackageManager, after that those classes could be mocked again.
  5. Markus Klein commented on patch set 1 CR +1 04/22/14, 19:51

    Thanks, makes totally sense.
  6. Christian Kuhn uploaded patch set 2 05/09/14, 11:08

  7. Christian Kuhn voted on patch set 2 CR -1 05/09/14, 11:08

  8. Christian Kuhn uploaded patch set 3 05/09/14, 13:15

  9. Christian Kuhn commented on patch set 1 05/09/14, 13:25

    ext_autoload.php:16 Reply

    I see no issue here: The flow bootstrap is not added to autoload here, only classLoader is. ClassLoader itself is not used anywhere else (except in some type hints) and there is also no cms alias defined to it.
  10. Christian Kuhn uploaded patch set 4 05/09/14, 13:35

  11. Christian Kuhn commented on patch set 4 05/09/14, 13:39

    LocalizationUtility.php:300

    Please take a careful look at this hunk: The configurationManager is a singleton, so it should not harm if it is "parked" in a local variable here, it should even be a bit quicker since the ObjectManager is no longer called after first instantiation of the method. This works as long as the ObjectManager does no additional magic on singleton instances ... from my findings, this looks ok, but I'd like to have a second eye here who signs off.
  12. Christian Kuhn commented on patch set 4 05/09/14, 14:06

  13. Markus Klein commented on patch set 4 05/09/14, 15:11

    Looks good at first glance. need to looker closer and test later on. thx Christian!
  14. Markus Klein uploaded patch set 5 05/11/14, 23:55

  15. Markus Klein commented on patch set 5 V +1 CR +1 05/11/14, 23:56

    works, but I had to run "composer update --no-plugin" to update properly. (no idea why)
  16. Tymoteusz Motylewski commented on patch set 5 V +1 CR +1 05/12/14, 10:02

    works like a charm :)
  17. Helmut Hummel commented on patch set 5 05/12/14, 14:38

    now testing
  18. Helmut Hummel commented on patch set 4 05/12/14, 14:42

    LocalizationUtility.php:300 Reply

    Yes, this is OK. It works as follows: ObjectManager is a TYPO3 singleton and lives for a complete request, returned by GeneralUtility::makeInstance() The ObjectManager itself "parks" singletons in a property and only returns it from there after first instantiation during Extbase extension bootstrap the current configuration array is given to the ConfigurationManager singleton object, which makes it handle the current configuration (of the currently rendering extension)
  19. Helmut Hummel commented on patch set 5 V -1 05/12/14, 14:48

    I get a fatal. investiagting
  20. Helmut Hummel commented on patch set 5 V +2 CR +2 05/12/14, 15:04

    ok, some tests fail or fatal with some directories (typo3conf/ext, uploads) not present, but this is not related to this change
  21. Helmut Hummel merged patch set 6 05/12/14, 15:04