- Issue created by @wim leers
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 2:43pm 24 March 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
+++ b/tests/src/Kernel/AssertLinkitFilterTrait.php @@ -38,6 +38,8 @@ trait AssertLinkitFilterTrait { + $canonical_url_aka_not_path_alias = '/entity_test_mul/manage/1'; + $this->assertStringNotContainsString($canonical_url_aka_not_path_alias, $this->process($input, $langcode)->getProcessedText());
Even though the test appears to claim to be testing that the filter puts the correct alias in place during filtering … that's not actually happening! 😅
This is caused by
if ($container->hasDefinition('path_alias.path_processor')) { // The alias-based processor requires the path_alias entity schema to be // installed, so we prevent it from being registered to the path processor // manager. We do this by removing the tags that the compiler pass looks // for. This means that the URL generator can safely be used within tests. $container->getDefinition('path_alias.path_processor') ->clearTag('path_processor_inbound') ->clearTag('path_processor_outbound'); }
in
\Drupal\KernelTests\KernelTestBase::register()
, which has been in place sinceKernelTestBase
was introduced in #2304461: KernelTestBaseTNG™ → !The solution is simple: undo that, because it's an assumption that is not a problem for this particular test, since we do install
path_alias
' entity schema. The last submitted patch, 2: 3350223-2-FAIL.patch, failed testing. View results →
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Note that this bug has only remained hidden for all these years because too much in the test was generated/computed. With more explicit expectations defined, this could never have happened.
As part of working on ✨ Drastically improve the linking experience in CKEditor 5 Needs work , I was hardening the test coverage, and that's how I discovered this. See that MR for a comprehensive strengthening of this module's filter kernel test.
The last submitted patch, 3: 3350223-3.patch, failed testing. View results →
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
The failure is unrelated:
There was 1 failure: 1) Drupal\Tests\linkit\FunctionalJavascript\LinkitDialogCKEditor5Test::testLinkDialog Failed asserting that a NULL is not empty.
- Assigned to mark_fullmer
- 🇺🇸United States mark_fullmer Tucson
The failure is unrelated:
I was getting a similar (but different assertion) false failure in https://www.drupal.org/project/linkit/issues/3232190#comment-14898179 📌 CKEditor 5 readiness Fixed
Assigning myself for review!
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
I just realized that's probably due to 📌 Update CKEditor 5 to 36.0.1 Fixed landing earlier today!
So, re-testing this against
10.0.x
, then it should pass 🤓 - 🇮🇳India rajeshreeputra Pune
In 10.0.7 CKEditor5 major upgrade to v36 has been now reverted .
- Status changed to RTBC
over 1 year ago 6:31pm 24 March 2023 - 🇺🇸United States mark_fullmer Tucson
// Undo what the parent did, to allow testing path aliases in kernel tests.
This comment clarifies what's going on here, so I think it's clear to our future selves why we're doing this :) . I also ran the tests against 9.5.x just to be sure after the 9.5.6/9.5.7 hullabaloo. Everything looks good!
-
mark_fullmer →
committed 0883abfd on 6.0.x authored by
Wim Leers →
Issue #3350223 by Wim Leers: LinkitFilterEntityTest::...
-
mark_fullmer →
committed 0883abfd on 6.0.x authored by
Wim Leers →
- Status changed to Fixed
over 1 year ago 6:33pm 24 March 2023 Automatically closed - issue fixed for 2 weeks with no activity.