Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Task | Novice task? | Contributor instructions | Complete? |
---|
As per the parent issue.
./Theme/EngineTwigTest.php
./Theme/EntityFilteringThemeTest.php
./Theme/FunctionsTest.php
./Theme/HtmlAttributesTest.php
./Theme/ThemeSuggestionsAlterTest.php
./Theme/ThemeTest.php
./Theme/TwigDebugMarkupTest.php
./Theme/TwigFilterTest.php
./Theme/TwigNamespaceTest.php
./Theme/TwigRawTest.php
./Theme/TwigTransTest.php
Lots of these can be kernel tests of split into browser and kernel tests.
Comment | File | Size | Author |
---|---|---|---|
#20 | interdiff-2863429-18-20.txt | 12.81 KB | ApacheEx |
#20 | 2863429-20.patch | 29.01 KB | ApacheEx |
Comments
Comment #2
jofitz CreditAttribution: jofitz at ComputerMinds commentedComment #3
jofitz CreditAttribution: jofitz at ComputerMinds commentedCorrected the component.
Comment #5
dawehnerWe could wait until the trait is ported on #2863318: Cache: Convert system functional tests to phpunit ... on the other hand I kinda believe we should move the trait directly.
Comment #6
michielnugter CreditAttribution: michielnugter as a volunteer and at Synetic commentedComment #8
mikejw CreditAttribution: mikejw at University of Adelaide commentedComment #9
mikejw CreditAttribution: mikejw at University of Adelaide commentedHave created a related issue: https://www.drupal.org/node/2912776 that this depends on.
Comment #10
mikejw CreditAttribution: mikejw at University of Adelaide commentedSo methods called from AssertContentTrait that are used:
- assertThemeOutput, which calls
- assertIdentical
- setRawContent
Comment #11
Lendude@mikejw If
setRawContent
is needed, then that part of the test needs to be converted to a KernelTest.Comment #14
LendudeSome conversions to kernel tests, some other stuff. Not everything will work yet. No interdiff cause #2 failed to apply so needed a small reroll.
Comment #16
LendudeThis was running pretty smooth locally, lets see if Mr. Bot agrees.
Comment #17
borisson_Mr. Bot does agree, but I don't yet - sorry @Lendude!
This looks like it's gotten more fragile? It does look like it's testing the same thing and more clearly - so probably not more fragile, but more explicit. Nevermind - good change!
huh? This looks like this is actually a changed test? Was this not executing earlier or how is this possible?
{@inheritdoc}
Needs docblock
Doing this with a for-loop is weird, it's only the same amount of lines, but less clear. Let's change this.
There should not be an empty line following an inline coment.
This should probably not be in seperate method in a browsertest? Can we move this to a kernel test instead?
Looks like this use is hugging the docblock, they need to be 1 tile apart!
Comment #18
Lendude@borisson_ thanks so much for the reviews!
#17.2 yeah sorta surprised me too. Dug a little deeper and turns out that hook is called like 8 times and one was in the right order but the rewrite was testing for the first instance. Updated the message to make this much clearer but might effect other tests if this is used in other places.
#17.5 this is actually the original webtestbase test, so I'd say we just leave it as is. It's not pretty but out of scope.
#17.7 yeah I missed that when I spit up the test, nice catch!
Fixed the rest. Some of it might be a bit out of scope, but the patch is hard to read for ThemeTest, some of it's new, some of it's old, so hard to see which changes are in scope for a conversion.
Comment #19
borisson_Thanks for fixing/answering my remarks. Looks super solid.
Comment #20
ApacheEx CreditAttribution: ApacheEx as a volunteer and at Internetdevels, Drupal Ukraine Community commentedJust a few improvements from my side:
1) TwigFilterTest moved to KernelTestBase
2) Reverted FunctionsTest to almost original version, just need to install classy theme as default to use right templates.
3) Reverted position of ThemeTest::testClassLoading, and added blank line.
So, -10KB to original patch :)
Comment #21
borisson_Great work @ApacheEx! That looks like a great improvement.
Comment #22
catchCommitted/pushed to 8.7.x and cherry-picked to 8.6.x. Thanks!