Closed (fixed)
Project:
Drupal core
Version:
8.7.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Mar 2017 at 17:39 UTC
Updated:
7 Aug 2018 at 03:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jofitzComment #3
jofitzCorrected 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 commentedComment #8
mikejw commentedComment #9
mikejw commentedHave created a related issue: https://www.drupal.org/node/2912776 that this depends on.
Comment #10
mikejw commentedSo methods called from AssertContentTrait that are used:
- assertThemeOutput, which calls
- assertIdentical
- setRawContent
Comment #11
lendude@mikejw If
setRawContentis 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 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!