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.
In #2958429: Properly deprecate SafeMarkup::format() we finished conversion of the SafeMarkup utility component to the FormattableMarkup render component. However, the kernel test class was not renamed at the same time. We should rename this class so it refers to the thing that it covers, and also so that we can remove the last remnants of SafeMarkup in #3091447: Remove Utility component BC layers
Comment | File | Size | Author |
---|---|---|---|
#13 | interdiff.3098244.4-13.txt | 601 bytes | longwave |
#13 | 3098244-13.patch | 3.31 KB | longwave |
Comments
Comment #2
longwaveComment #4
longwaveIt would help if I used the correct namespace.
Comment #5
andypostIt looks good, but when we rename test classes we should left a copy of existing one and remove it in d9?!
Comment #6
Krzysztof Domański1.
@group Render
instead of@group Utility
.2.
We have several tests in the core/tests/Drupal/KernelTests/Core/Render directory. Can we move this test there?3. Re #5: Only one unsupported contrib module uses this test. Browser development module is not used. I think we can keep the old (deprecated) test, but IMO it won't be bad if we remove it.
http://grep.xnddx.ru/search?text=SafeMarkupKernelTest&filename=
Comment #7
Madhura BK CreditAttribution: Madhura BK at UniMity Solutions Pvt Limited for Drupal India Association commentedComment #8
longwaveRe: #6.3 that is an unused use statement anyway, so I think we can say the old class is safe to remove.
Comment #9
Madhura BK CreditAttribution: Madhura BK at UniMity Solutions Pvt Limited for Drupal India Association commentedHave implemented the changes suggested in #6
Comment #10
Krzysztof Domański@Madhura BK Thanks! We need to change the namespace after moving to another directory.
-namespace Drupal\KernelTests\Component\Render;
+namespace Drupal\KernelTests\Core\Render;
Comment #11
Madhura BK CreditAttribution: Madhura BK at UniMity Solutions Pvt Limited for Drupal India Association commentedOh, I had forgotten to change the namespace.Have fixed it in this patch.Thanks Krzysztof Domański.
Comment #12
Krzysztof DomańskiI realised that
FormattableMarkup
class is insidecore/lib/Drupal/Component/Render
so test should be insidecore/tests/Drupal/KernelTests/Component/Render
.Comment #13
longwaveThere is also a misaligned comment marker that we might as well fix while we are here. Interdiff is from #4.
Comment #14
Krzysztof DomańskiAll feedback (#6, #8) was addressed.
Comment #15
alexpottCommitted and pushed fd224bc774 to 9.0.x and 5d64d72c03 to 8.9.x and 82aea19c5d to 8.8.x. Thanks!
Backported to 8.8.x since this is a test-only change.
@andypost tests are not API - (test traits can be though).