Review main Merged

72162[TASK] Add correct test for shortcut issue in language menu

Nikita Hovratov CR +2 V +2 Easy +35 −0 updated 11/12/21, 22:54

Commit message

The added tests for #89871 do not prove the
correctness of the patch. They go green, without the
fix being applied. This is a blocker for another
regression bugfix, which depends on these tests.

The issue lied in the language menu, not the normal
menu. For this, a new method createLanguageMenu has
been added to AbstractLocalizedPagesTestCase.php. It
is now used to assure the generated links always
point to the target language and not to the current
one.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 3

Files 3

Review log 1215

  1. Nikita Hovratov uploaded patch set 1 11/12/21, 13:25

  2. core-ci voted on patch set 1 V +1 11/12/21, 13:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19207

  3. Oliver Klee commented on patch set 1 11/12/21, 14:01

    AbstractLocalizedPagesTestCase.php:155

    I propose making this method static for consitency (as PHPUnit's own assert* methods are static as well).

    ScenarioDTest.php:199

    Let's make the test method name a statement about the expected behavior (including a verb :-) ). My suggestion: languageMenuHasLanguageShortcutsWithLanguageSpecificUrls
  4. Nikita Hovratov commented on patch set 1 11/12/21, 14:14

    AbstractLocalizedPagesTestCase.php:155 Reply

    Can't do that because of $this references. What we can do is, to not call phpunits assert within this function and just return the result

    ScenarioDTest.php:199 Reply

    Sounds good :)
  5. Nikita Hovratov uploaded patch set 2 11/12/21, 14:19

  6. Nikita Hovratov commented on patch set 1 11/12/21, 14:20

    AbstractLocalizedPagesTestCase.php:155 Reply

    Done

    ScenarioDTest.php:199 Reply

    Done
  7. Oliver Klee commented on patch set 2 CR +1 11/12/21, 14:24

    Neat!
  8. Nikita Hovratov updated the commit message in patch set 3 11/12/21, 14:29

  9. Nikita Hovratov commented on patch set 3 11/12/21, 14:30

    Adjusted the commit message, please revote.
  10. core-ci voted on patch set 2 V +1 11/12/21, 14:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19208

  11. Oliver Klee voted on patch set 3 CR +1 11/12/21, 14:41

  12. core-ci voted on patch set 3 V +1 11/12/21, 14:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19209

  13. Stefan Bürk voted on patch set 3 V +1 CR +1 11/12/21, 15:14

  14. Benni Mack voted on patch set 3 V +2 CR +2 11/12/21, 22:54

  15. Benni Mack merged patch set 4 11/12/21, 22:54