Review main Merged

62503[TASK] Use inject methods instead of "inject" base test method

Benni Mack CR +2 V +2 Normal +91 −102 updated 12/02/19, 16:37

Commit message

There are numereous places where reflection is used
in our test cases to inject dependencies, however
there are methods available doing so, so the tests
can be adapted, which will speed up tests.

In addition, the $callInaccessibleMethod() function
is also replaced by the accessible mock functionality,
resulting in faster results than reflection.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Susi Moog +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Susi Moog +1
    • TYPO3com +1 CI

Issues 1

Files 21

Show 1 more file

Review log 810

  1. Benni Mack uploaded patch set 1 12/02/19, 09:13

  2. TYPO3com voted on patch set 1 V -1 12/02/19, 09:57 Completed build in 16m 21s on Mon, 2 Dec, 09:57 AM Test Summary: 84 of 48719 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38995

  3. Benni Mack uploaded patch set 2 12/02/19, 15:28

  4. TYPO3com voted on patch set 2 V +1 12/02/19, 16:00 Completed build in 31m 40s on Mon, 2 Dec, 04:00 PM Test Summary: 48376 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39016

  5. Susi Moog voted on patch set 2 V +1 CR +1 12/02/19, 16:24

  6. Andreas Kienast commented on patch set 2 V +2 CR +1 12/02/19, 16:35

    DataHandlerTest.php:587

    Shouldn't we pass $this->subject as argument into the method and use it instead of $this?
  7. Benni Mack commented on patch set 2 12/02/19, 16:36

    DataHandlerTest.php:587 Reply

    the context is set in the closure by the second parameter ($newThis).
  8. Susi Moog commented on patch set 2 12/02/19, 16:36

    DataHandlerTest.php:587 Reply Unresolved

    nope, second parameter of closure::bind is "this" in the context of the closure.
  9. Andreas Kienast voted on patch set 2 CR +2 12/02/19, 16:37

  10. Andreas Kienast merged patch set 3 12/02/19, 16:37