Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
menu_link_content.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Apr 2017 at 19:05 UTC
Updated:
27 May 2017 at 18:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
michielnugter commentedComment #3
michielnugter commentedComment #4
michielnugter commentedComment #5
michielnugter commentedComment #6
snetcher commentedComment #8
dawehnerThank you for your contribution!
You can solve the remaining test failures.
Here is an example:
and use
$element[0]->getAttribute('value')instead.Comment #9
snetcher commentedThere's special method
getValue()Comment #10
dawehnerCool
Comment #12
snetcher commented#9 patch was wrong, proper one
Comment #13
dawehnercore/modules/menu_link_content/src/Tests/MenuLinkContentTranslationUITest.phpis the only remaining test.Comment #14
michielnugter commentedComment #15
alexpottSo we can actually convert all tests.
Comment #16
michielnugter commented@alexpott, very nice that we can convert the whole module at once now!
Comment #17
andypostHere is the conversion
Comment #18
andypostproper namespace & interdiff against #12
Comment #21
andypostAnother round
Comment #22
claudiu.cristeaShouldn't we remove deprecated format_string() if we already touched this line?
Comment #24
michielnugter commented@claudiu.cristea
We've tried to keep the changes as minimal as possible with the conversions to ease reviewing. After all the conversions are done we'll likely need to convert all deprecated code (though that might be targeted on the 9.x branch).
As the format_string() is still used all over the place I'm in favor of keeping it as is for now and convert all of them to a sprintf in one go for the tests later on.
Comment #25
andypost@claudiu.cristea thanx, good point!
now patch fixes both places!
btw
MenuLinkContentTranslationUITestis the first test class that usingabstract class ContentTranslationUITestBaseComment #26
akashkrishnan01 commentedDid a quick test, patch is getting applied successfully
Comment #27
lendudeBit of a shame we need to fix a base class in a different module for this, but the changes seem straightforward enough so I'm in favour of fixing that here and not in a separate issue first.
Applied the patch, checked the moves and everything looks good!
Updated the IS to include @andyposts findings on
\Drupal\Tests\content_translation\Functional\ContentTranslationUITestBaseComment #29
andypostComment #30
dawehnerNice conversion
Comment #31
alexpottCommitted and pushed e2b46f1 to 8.4.x and 4b857af to 8.3.x. Thanks!
So yeah that base class is super interesting because at the moment we have to maintain both base classes. I was about to file a patch to remove the functional one because nothing was using it. Imo we should have converted all the WTB that use ContentTranslationUITestBase at the same time - but stuff is tricky. At least with this patch we finally have a single usage.
Comment #34
dawehnerI think what we should aim for is a good momentum of test conversion. When things are not 100% perfect in between it matters much less. Note: Test falls under different rules than normal code.
Comment #35
akashkrishnan01 commented