Re #3 As far as I can see there is just one test failing. It looks related to the issue as it involves composer metapackages. The test asserts 200 but gets 500 response, it seems.
Re: #72 @smustgrave You told me that before and I heard you. As far as credit goes, you can see at #70 that I have already fixed PHPCS and as a result the pipeline has moved forward to the tests and lo ahd behold! several tests are failing. So they need to be fixed. Maybe not a huge amount of progress but progress, nevertheless. If I could wave a magic wand and become an expert contributor overnight with 500 credits not 66 credits, maybe i could contribute more to this issue or do what I do at a faster rate. I have waited 48 hours for @sokru to PHPCS his own work. (another rule I was told about?). I see that test-only was a wrong move,now. But I was trying to do a bit more that just fix PHPCS. I was hoping to fix at least one of the broken tests, too. But the test-only test set me off on the wrong path. Thanks for putting me right on that!
Output of test-only test:
PHPUnit 11.5.42 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3153559/core/phpunit.xml.dist
E 1 / 1 (100%)
Time: 00:05.893, Memory: 8.00 MB
There was 1 error:
1) Drupal\Tests\content_translation\Functional\ContentTranslationRevisionTranslationDeletionTest::testOverview
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.node.revision_delete_form" does not exist.
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Routing/RouteProvider.php:214
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Routing/UrlGenerator.php:450
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Routing/UrlGenerator.php:290
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php:105
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Url.php:773
/builds/issue/drupal-3153559/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php:201
/builds/issue/drupal-3153559/core/modules/content_translation/tests/src/Functional/ContentTranslationRevisionTranslationDeletionTest.php:45
ERRORS!
Tests: 1, Assertions: 69, Errors: 1.
HTML output directory sites/simpletest/browser_output is not a writable directory.
PHPUnit 11.5.42 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3153559/core/phpunit.xml.dist
FF 2 / 2 (100%)
Time: 00:00.050, Memory: 10.00 MB
There were 2 failures:
1) Drupal\Tests\content_translation\Unit\Menu\ContentTranslationLocalTasksTest::testBlockAdminDisplay with data set #0 ('entity.node.canonical', [['content_translation.local_tas...erview', 'entity.node.canonical', 'entity.node.edit_form', 'entity.node.delete_form', 'entity.version_history:node.v...istory']])
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
1 => 'entity.node.canonical'
2 => 'entity.node.edit_form'
3 => 'entity.node.delete_form'
- 4 => 'entity.version_history:node.version_history'
+ 4 => 'entity.node.version_history'
+ 5 => 'entity.version_history:node.v...istory'
)
)
/builds/issue/drupal-3153559/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php:149
/builds/issue/drupal-3153559/core/modules/content_translation/tests/src/Unit/Menu/ContentTranslationLocalTasksTest.php:72
2) Drupal\Tests\content_translation\Unit\Menu\ContentTranslationLocalTasksTest::testBlockAdminDisplay with data set #1 ('entity.node.content_translati...erview', [['content_translation.local_tas...erview', 'entity.node.canonical', 'entity.node.edit_form', 'entity.node.delete_form', 'entity.version_history:node.v...istory']])
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
1 => 'entity.node.canonical'
2 => 'entity.node.edit_form'
3 => 'entity.node.delete_form'
- 4 => 'entity.version_history:node.version_history'
+ 4 => 'entity.node.version_history'
+ 5 => 'entity.version_history:node.v...istory'
)
)
/builds/issue/drupal-3153559/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php:149
/builds/issue/drupal-3153559/core/modules/content_translation/tests/src/Unit/Menu/ContentTranslationLocalTasksTest.php:72
FAILURES!
Tests: 2, Assertions: 4, Failures: 2.
HTML output directory sites/simpletest/browser_output is not a writable directory.
PHPUnit 11.5.42 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3153559/core/phpunit.xml.dist
E 1 / 1 (100%)
Time: 00:02.747, Memory: 8.00 MB
There was 1 error:
1) Drupal\Tests\node\Functional\NodeRevisionsAuthorTest::testNodeRevisionRevertAuthors
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.node.revision_revert_form" does not exist.
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Routing/RouteProvider.php:214
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Routing/UrlGenerator.php:450
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Routing/UrlGenerator.php:290
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php:105
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Url.php:773
/builds/issue/drupal-3153559/core/tests/Drupal/Tests/UiHelperTrait.php:321
/builds/issue/drupal-3153559/core/tests/Drupal/Tests/UiHelperTrait.php:260
/builds/issue/drupal-3153559/core/modules/node/tests/src/Functional/NodeRevisionsAuthorTest.php:66
ERRORS!
Tests: 1, Assertions: 11, Errors: 1.
HTML output directory sites/simpletest/browser_output is not a writable directory.
PHPUnit 11.5.42 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3153559/core/phpunit.xml.dist
F.E 3 / 3 (100%)
Time: 00:13.188, Memory: 8.00 MB
There was 1 error:
1) Drupal\Tests\node\Functional\NodeRevisionsTest::testRevisionTranslationRevert
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.node.revision_revert_form" does not exist.
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Routing/RouteProvider.php:214
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Routing/UrlGenerator.php:450
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Routing/UrlGenerator.php:290
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php:105
/builds/issue/drupal-3153559/core/lib/Drupal/Core/Url.php:773
/builds/issue/drupal-3153559/core/tests/Drupal/Tests/UiHelperTrait.php:321
/builds/issue/drupal-3153559/core/tests/Drupal/Tests/UiHelperTrait.php:260
/builds/issue/drupal-3153559/core/modules/node/tests/src/Functional/NodeRevisionsTest.php:449
--
There was 1 failure:
1) Drupal\Tests\node\Functional\NodeRevisionsTest::testRevisions
Behat\Mink\Exception\ExpectationException: Current page is "/node/1", but "/node/1/revisions" expected.
/builds/issue/drupal-3153559/core/tests/Drupal/Tests/WebAssert.php:592
/builds/issue/drupal-3153559/core/tests/Drupal/Tests/WebAssert.php:781
/builds/issue/drupal-3153559/core/modules/node/tests/src/Functional/NodeRevisionsTest.php:240
ERRORS!
Tests: 3, Assertions: 66, Errors: 1, Failures: 1.
HTML output directory sites/simpletest/browser_output is not a writable directory.
PHPUnit 11.5.42 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3153559/core/phpunit.xml.dist
.F. 3 / 3 (100%)
Time: 00:08.274, Memory: 8.00 MB
There was 1 failure:
1) Drupal\Tests\node\Functional\NodeRevisionsUiTest::testNodeRevisionDoubleEscapeFix
Behat\Mink\Exception\ExpectationException: The string "<a href="/subdirectory/node/1/revisions/1/view" hreflang="en">20 Oct 2025 - 10:35</a> by <a title="View user profile." href="/subdirectory/user/2">b30s56ao</a>" was not found anywhere in the HTML response of the current page.
/builds/issue/drupal-3153559/vendor/behat/mink/src/WebAssert.php:888
/builds/issue/drupal-3153559/vendor/behat/mink/src/WebAssert.php:363
/builds/issue/drupal-3153559/core/tests/Drupal/Tests/WebAssert.php:559
/builds/issue/drupal-3153559/core/modules/node/tests/src/Functional/NodeRevisionsUiTest.php:139
FAILURES!
Tests: 3, Assertions: 34, Failures: 1.
HTML output directory sites/simpletest/browser_output is not a writable directory.
PHPUnit 11.5.42 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3153559/core/phpunit.xml.dist
..F......FF.. 13 / 13 (100%)
Time: 00:00.054, Memory: 10.00 MB
There were 3 failures:
1) Drupal\Tests\node\Unit\NodeOperationAccessTest::testRevisionOperations with data set "bypass, revert" ('revert', [['access content', true], ['bypass node access', true]], false)
Failed asserting that true matches expected false.
/builds/issue/drupal-3153559/core/modules/node/tests/src/Unit/NodeOperationAccessTest.php:124
2) Drupal\Tests\node\Unit\NodeOperationAccessTest::testRevisionOperations with data set "revert, with update access, non default" ('revert', [['access content', true], ['revert all revisions', true], ['bypass node access', true]], true, false)
Expectation failed for method name is "isDefaultRevision" when invoked at least once.
Expected invocation at least once but it never occurred.
3) Drupal\Tests\node\Unit\NodeOperationAccessTest::testRevisionOperations with data set "revert, with update access, default revision" ('revert', [['access content', true], ['revert all revisions', true], ['bypass node access', true]], false, true)
Failed asserting that true matches expected false.
/builds/issue/drupal-3153559/core/modules/node/tests/src/Unit/NodeOperationAccessTest.php:124
FAILURES!
Tests: 13, Assertions: 25, Failures: 3.
Exiting with EXIT_CODE=1
Fixed PHPCS. Now there are a few tests failing. One is in NodeRevisionsTest.php. It concerns a missing 'revert' button so seems related to the issue. Though looking at the screenshots in the IS does not seem to be any removal of 'revert' buttons going on.
Updated the IS. Added detail to instruction to reproduce.
Looks like Test cases could be added to NodeAdminTest.php.
Fixed JSLINT. Now one test is failing. Does not seem to be related so re-running it.
oily → changed the visibility of the branch 2766853-add-label-to to hidden.
After trying things mentioned in #8 have abandoned the attempt.
Re #5, as stated in #6 the test-only test is failing as described in #6. It seems to me the test coverage is adequate. So moving to RTBTC. I know i may be a little too fast to move to RTBTC but will take the rap over the knuckles if it happens and be slower next time : ).
Here is the test-only output:
PHPUnit 11.5.42 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3520188/core/phpunit.xml.dist
F. 2 / 2 (100%)
Time: 00:01.765, Memory: 8.00 MB
There was 1 failure:
1) Drupal\KernelTests\Core\Datetime\DateFormatterTest::testFormat
Cannot load the "date_format" entity with NULL ID.
/builds/issue/drupal-3520188/core/lib/Drupal/Core/Entity/EntityStorageBase.php:265
/builds/issue/drupal-3520188/core/lib/Drupal/Core/Datetime/DateFormatter.php:344
/builds/issue/drupal-3520188/core/lib/Drupal/Core/Datetime/DateFormatter.php:129
/builds/issue/drupal-3520188/core/tests/Drupal/KernelTests/Core/Datetime/DateFormatterTest.php:75
FAILURES!
Tests: 2, Assertions: 10, Failures: 1.
Exiting with EXIT_CODE=1
Re #19 I came across this issue issue creating controller resolver 🐛 Error when not prefixing controller with backslash in route definition and registering the controller as service Needs work . I am wondering if it would be inside a controller resolver like that one to implement the route deprecation?
I see route aliasing a la Symfony 5.4 seems to have been agreed as a way to deprecate routes. See #19 and #20 in: old issue on route aliasing → .
At #10 @mstrelan refers to:
https://git.drupalcode.org/project/drupal/-/commit/4a4c358e6ff0c0f49c0ef...
I think I have resolved the merge conflict in the MR. But the name of the MR might be causing a problem (it includes the 'drupal-3270083' repeated: the pipeline is not running for some reason, anyway it seems.
oily → changed the visibility of the branch 3270083-some-theme-hooks to hidden.
It is a bit confusing having several MR's. I have hidden all but what seems to be the 'working' one. Not that it is the only valuable MR.
oily → changed the visibility of the branch 3481590-views-entityreference-filter_10.5.x to hidden.
The test-only test is now erroring because the ::testAddAsteriskExplanation method does not exist. Not sure that the test-only test is helpful for this issue. That should be happening, I think. Whereas the Error: Call to undefined function test_form_id()
in #51 was a genuine coding error, which I hope is now fixed?
The tests are now passing.
Fixed PHPSTAN. Reviewed the draft CR. Looks good.
The test-only test looks good. It outputs:
PHPUnit 11.5.34 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3037446/core/phpunit.xml.dist
..................................................E 51 / 51 (100%)
Time: 00:00.114, Memory: 12.00 MB
There was 1 error:
1) Drupal\Tests\Core\Form\FormBuilderTest::testAddAsteriskExplanation
Error: Call to undefined function test_form_id()
/builds/issue/drupal-3037446/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php:1115
ERRORS!
Tests: 51, Assertions: 145, Errors: 1.
Exiting with EXIT_CODE=2
I cannot reproduce the bug. Also the code looks to be fixed in the master branch, now.
I cannot reproduce the bug from the IS. Setting to postponed. IS needs more detail to reproduce.
@dcam Re #28 Do you mean the addition to the coding standards as a follow up? That might be a more general issue not necessarily related to this particular issue?
Applied fix to PHPCS errors and some of the PHPSTAN errors.
oily → changed the visibility of the branch 3523476-date-filter-operator to active.
oily → changed the visibility of the branch 3523476-date-filter-operator to hidden.
The end result is that the URL ends up being built earlier than it was previously for the sake of checking if it's external. I'm not 100% sure, but I think it bypassses validation steps that it ordinarily would have gone through. Instead, the value is sent right to being built by Url::fromUri(),..
Why does this happen? Do you think it happens because it is configured as a computed field? If so, could it be converted to a non-computed field ie a checkbox the user can select? It might overlap with the radio buttons element and seem to be seeking repeated input from the user. But with the right help text its purpose could be differentiated from the radio buttons element? As a non-computed field it would be added a tinyint field in the database like other boolean fields? I know that the IS discounts this as a way of handling the issue but is it worth re-considering?
@dcam Re: #13 Interesting observations. Reviewing the code recently I wondered about the existing radio buttons options form element. I wondered if that itself could be refactored. It might be a more radical change than is proposed in this issue. But would the ideal fix be to replace the code controlling that entity field/ form element rather than adding a new one computed from the existing field?
I have reviewed the latest issue branch. I am able to install the action example module in a vanilla Drupal 11 site. Changing to RTBTC.
I have manually tested the rgb colour field. I installed the examples and devel modules in a vanilla Drupal 11 site installed with the standard profile. I added the field to the article content type. I used devel to generate 50 items including articles. Here is a screenshot of the rgb colour field in an article:
Re: #79:
If it is needed, the next step is to redo the patch, to patch core/modules/contextual/src/Hook/ContextualViewsHooks.php instead.
Do you mean 'If it is not needed,..' [then we can] 'patch core/modules/contextual/src/Hook/ContextualViewsHooks.php instead.'?
If we can get the fix done described in the IS title, by patching/ editing contextual.views.inc then I think that is within the scope of this issue. Removing contextual.views.inc should be done in a follow-up?
oily → changed the visibility of the branch 2532200-contextual-links-views-handler to hidden.
oily → changed the visibility of the branch drupal-2532200-test-only to hidden.
Ran the test-only test:
PHPUnit 11.5.39 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-2752187/core/phpunit.xml.dist
E 1 / 1 (100%)
Time: 00:00.928, Memory: 8.00 MB
There was 1 error:
1) Drupal\Tests\link\Kernel\LinkItemTest::testLinkItem
Error: Call to undefined method Drupal\link\Plugin\Field\FieldType\LinkItem::toLink()
/builds/issue/drupal-2752187/core/modules/link/tests/src/Kernel/LinkItemTest.php:98
ERRORS!
Tests: 1, Assertions: 5, Errors: 1.
HTML output directory sites/simpletest/browser_output is not a writable directory.
PHPUnit 11.5.39 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-2752187/core/phpunit.xml.dist
EFF 3 / 3 (100%)
Time: 00:00.027, Memory: 8.00 MB
There was 1 error:
1) Drupal\Tests\link\Unit\LinkItemTest::testToLink
Error: Call to undefined method MockObject_LinkItem_c54c6190::toLink()
/builds/issue/drupal-2752187/core/modules/link/tests/src/Unit/LinkItemTest.php:47
--
There were 2 failures:
1) Drupal\Tests\link\Unit\LinkItemTest::testToLinkWithEmptyField
Failed asserting that exception of type "Error" matches expected exception "InvalidArgumentException". Message was: "Call to undefined method MockObject_LinkItem_0a9ce685::toLink()" at
/builds/issue/drupal-2752187/core/modules/link/tests/src/Unit/LinkItemTest.php:64
.
2) Drupal\Tests\link\Unit\LinkItemTest::testToLinkWithBadUrl
Failed asserting that exception of type "Error" matches expected exception "InvalidArgumentException". Message was: "Call to undefined method MockObject_LinkItem_c54c6190::toLink()" at
/builds/issue/drupal-2752187/core/modules/link/tests/src/Unit/LinkItemTest.php:90
.
ERRORS!
Tests: 3, Assertions: 2, Errors: 1, Failures: 2.
I think this indicates the Unit test is working?
Hi @ishani patel, I think maybe the names of the module folders will need to change too. And all the files will need to be renamed. So, for example, the 'config_simple.info.yml' file will be renamed to 'example_config_simple.info.yml'?
Re: #30, I see #29 is correct, there is test coverage in the 20 patch that can be merged into the MR.
This is the test-only output now:
PHPUnit 11.5.39 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3505182/core/phpunit.xml.dist
E 1 / 1 (100%)
Time: 00:05.160, Memory: 8.00 MB
There was 1 error:
1) Drupal\Tests\navigation\Functional\NavigationTitleMissingLabelTest::testNavigationTitlePluginHandlesMissingLabel
TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in /builds/issue/drupal-3505182/core/lib/Drupal/Component/Render/FormattableMarkup.php on line 238
/builds/issue/drupal-3505182/core/lib/Drupal/Component/Utility/Html.php:433
/builds/issue/drupal-3505182/core/lib/Drupal/Component/Render/FormattableMarkup.php:238
/builds/issue/drupal-3505182/core/lib/Drupal/Component/Render/FormattableMarkup.php:187
/builds/issue/drupal-3505182/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:195
/builds/issue/drupal-3505182/core/lib/Drupal/Component/Utility/ToStringTrait.php:15
/builds/issue/drupal-3505182/core/lib/Drupal/Core/Entity/EntityType.php:719
/builds/issue/drupal-3505182/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1444
/builds/issue/drupal-3505182/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php:78
/builds/issue/drupal-3505182/core/lib/Drupal/Core/Entity/EntityFieldManager.php:235
/builds/issue/drupal-3505182/core/lib/Drupal/Core/Entity/EntityFieldManager.php:197
/builds/issue/drupal-3505182/core/lib/Drupal/Core/Entity/EntityFieldManager.php:459
/builds/issue/drupal-3505182/core/lib/Drupal/Core/Extension/ModuleInstaller.php:375
/builds/issue/drupal-3505182/core/lib/Drupal/Core/Extension/ModuleInstaller.php:229
/builds/issue/drupal-3505182/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
/builds/issue/drupal-3505182/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:511
/builds/issue/drupal-3505182/core/tests/Drupal/Tests/BrowserTestBase.php:537
/builds/issue/drupal-3505182/core/tests/Drupal/Tests/BrowserTestBase.php:343
/builds/issue/drupal-3505182/core/modules/navigation/tests/src/Functional/NavigationTitleMissingLabelTest.php:36
ERRORS!
Tests: 1, Assertions: 0, Errors: 1, PHPUnit Deprecations: 2.
Since the test is breaking due to null value I am wondering if #3 where a fallback value is substituted for null might be best?
oily → changed the visibility of the branch 3505182-an-entity-without to active.
oily → changed the visibility of the branch 3505182-an-entity-without to hidden.
Re #27 Thank you @berdir. I think I have that right now. That was a lot of 'tweaking' of the test entity. There is an odd error message breaking the test now, the same test as was breaking due to 403. I am not sure if I have fixed the 403. This error may be concealing the 403 one?
There is a failing assertion in relation to the test entity and the navigation top bar. The assertion fails due to a 403 reponse code instead of 200. Any ideas how to deal with it? Put to Needs review, yet?
Coverted the test entity annotation to an attribute. The pipeline shows broken tests but the output is useful, now. The test entity may need some tweaks but hopefully test coverage is close.
I have added the entity test code from one branch to the other and hidden the branch I copied the test entity code from. There is work to do on the tests.
oily → changed the visibility of the branch 3505182-11x-with-testcase to hidden.
Re: #118 Do you mean these lines when you mention 'the new helper'? Reading #75 did not help me to understand you, but probably need to re-read it.
$edit = $this->getMetadataValueAndAssertNoField('uid', $this->randomMachineName(12));
$edit += $this->getMetadataValueAndAssertNoField('created', '19/11/1978');
And they can be used in place of these lines:
$entity_types = ['block_content', 'image', 'menu_link_content', 'shortcut', 'taxonomy_term', 'user'];
$uid = (in_array($entity->getEntityTypeId(), $entity_types)) ? 'content_translation[uid]' : 'uid';
$created = (in_array($entity->getEntityTypeId(), $entity_types)) ? 'content_translation[created]' : 'created';
$edit = [
// User names have by default length 8.
$uid => $this->randomMachineName(12),
$created => '19/11/1978',
];
Re: #21 Okay, makes sense. Nice that the entity code has been done and is ready to merge in.
The test coverage could go in core/modules/link/tests/src/Functional/LinkFieldTest.php
Can maybe create a test based slightly on ::testLinkWidgetCaughtExceptionEditingInvalidUrl at line 498 and refactor this block for our needs:
$this->fieldStorage->save();
FieldConfig::create([
'field_storage' => $this->fieldStorage,
'label' => 'Link',
'bundle' => 'entity_test',
'settings' => [
'title' => DRUPAL_OPTIONAL,
'link_type' => LinkItemInterface::LINK_GENERIC,
],
])->save();
Re: #27 See also #6 and #8 There is now test coverage. Not sure if there is a need for further coverage. Here is output of test-only:
PHPUnit 11.5.39 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3232077/core/phpunit.xml.dist
F 1 / 1 (100%)
Time: 00:11.072, Memory: 8.00 MB
There was 1 failure:
1) Drupal\Tests\field\Kernel\Migrate\d6\MigrateFieldFormatterSettingsTest::testEntityDisplaySettings
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
'url_plain' => true,
'rel' => '0',
'target' => '0',
- 'noopener' => '',
- 'noreferrer' => '',
],
'third_party_settings' => Array &2 [],
'weight' => 7,
'region' => 'content',
]
/builds/issue/drupal-3232077/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldFormatterSettingsTest.php:130
FAILURES!
Tests: 1, Assertions: 20, Failures: 1.
Exiting with EXIT_CODE=1
This test seems okay.
It seems that the update in core/modules/views/tests/fixtures/update/views.view.test_table_css_class.yml is triggering the deprecation at lines 293 to 296 of core/modules/views/src/ViewsConfigUpdater.php.
@berdir Should/ can views.view.test_table_css_class.yml and core/modules/views/tests/fixtures/update/test_table_css_class.php be removed? Should that be done in a follow up?
Here is the test-only output:
PHPUnit 11.5.34 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-2823541/core/phpunit.xml.dist
DF 2 / 2 (100%)
Time: 00:13.405, Memory: 8.00 MB
There was 1 failure:
1) Drupal\Tests\views\FunctionalJavascript\BlockExposedFilterAJAXTest::testSortPersistence
Behat\Mink\Exception\ElementNotFoundException: Element matching css "#view-title-table-column.is-active" not found.
/builds/issue/drupal-2823541/vendor/behat/mink/src/WebAssert.php:465
/builds/issue/drupal-2823541/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php:131
--
2 tests triggered 1 deprecation:
1) /builds/issue/drupal-2823541/core/modules/views/src/ViewsConfigUpdater.php:295
The update to add a default table CSS class for view "block_exposed_ajax2" is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Profile, module and theme provided configuration should be updated. See https://www.drupal.org/node/3499943
Triggered by:
* Drupal\Tests\views\FunctionalJavascript\BlockExposedFilterAJAXTest::testExposedFilteringAndReset
/builds/issue/drupal-2823541/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php:65
* Drupal\Tests\views\FunctionalJavascript\BlockExposedFilterAJAXTest::testSortPersistence
/builds/issue/drupal-2823541/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php:112
FAILURES!
Tests: 2, Assertions: 25, Failures: 1, Deprecations: 1.
HTML output directory sites/simpletest/browser_output is not a writable directory.
PHPUnit 11.5.34 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-2823541/core/phpunit.xml.dist
F 1 / 1 (100%)
Time: 00:04.949, Memory: 8.00 MB
There was 1 failure:
1) Drupal\Tests\views\FunctionalJavascript\BlockOverridesAJAXTest::testBlockOverridesAjax
Failed asserting that actual size 10 matches expected size 5.
/builds/issue/drupal-2823541/core/modules/views/tests/src/FunctionalJavascript/BlockOverridesAJAXTest.php:92
FAILURES!
Tests: 1, Assertions: 10, Failures: 1, PHPUnit Deprecations: 2.
There is a failing test that looks related. Here is the output:
PHPUnit 11.5.34 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.12
Configuration: /builds/issue/drupal-2823541/core/phpunit.xml.dist
F 1 / 1 (100%)
HTML output was generated.
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_demo_umami_FunctionalJavascript_OpenTelemetryNodePagePerformanceTest-1-42095066.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_demo_umami_FunctionalJavascript_OpenTelemetryNodePagePerformanceTest-2-42095066.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_demo_umami_FunctionalJavascript_OpenTelemetryNodePagePerformanceTest-3-42095066.html
Time: 00:32.512, Memory: 10.00 MB
Open Telemetry Node Page Performance (Drupal\Tests\demo_umami\FunctionalJavascript\OpenTelemetryNodePagePerformance)
✘ Node page
┐
├ Failed asserting that two arrays are identical.
┊ ---·Expected
┊ +++·Actual
┊ @@ @@
┊ Array &0 [
┊ -····'QueryCount'·=>·458,
┊ +····'QueryCount'·=>·460,
┊ 'CacheSetCount' => 441,
┊ 'CacheDeleteCount' => 0,
┊ 'CacheTagLookupQueryCount' => 43,
│
│ /builds/issue/drupal-2823541/core/tests/Drupal/Tests/PerformanceTestTrait.php:689
│ /builds/issue/drupal-2823541/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php:66
│ /builds/issue/drupal-2823541/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php:30
┴
FAILURES!
Tests: 1, Assertions: 10, Failures: 1.
---- Drupal\Tests\navigation\FunctionalJavascript\PerformanceTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Pass 22.562s testLogin
---- Drupal\Tests\ckeditor5\FunctionalJavascript\CKEditor5AllowedTagsTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Pass 12.793s testEnablingToVersion5Validation
Pass 6.338s testImageUploadsRemainEnabled
Pass 8.907s testSwitchToVersion5
Pass 9.138s testImgAddedViaUploadPlugin
Pass 13.026s testAllowedTags
Pass 8.982s testMediaElementAllowedTags
Pass 9.289s testFullHtml
---- Drupal\FunctionalJavascriptTests\Ajax\AjaxTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Pass 6.810s testAjaxWithAdminRoute
Pass 6.762s testDrupalSettingsCachingRegression
Pass 15.181s testInsertAjaxResponse
Pass 4.007s testGlobalEvents
Pass 5.883s testUiAjaxException
Skipped 0.000s testAjaxFocus
---- Drupal\FunctionalJavascriptTests\TableDrag\TableDragTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Pass 7.464s testRowWeightSwitch
Pass 5.687s testDragAndDrop
Pass 10.631s testKeyboardAccessibility
Pass 6.831s testRootLeafDraggableRowsWithKeyboard
Pass 4.128s testTableDragChangedWarning
Pass 12.087s testNestedDraggableTables
---- Drupal\Tests\workspaces\FunctionalJavascript\WorkspacesMediaLibraryIntegrationTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Skipped 0.000s testFocusNotAppliedWithoutSelectionChange
Pass 28.282s testWidget
Skipped 0.000s testRequiredMediaField
Pass 10.626s testRemoveAfterReordering
Pass 10.283s testAddAfterReordering
Skipped 0.000s testWidgetPreview
---- Drupal\Tests\system\FunctionalJavascript\Form\DevelopmentSettingsFormTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Pass 5.248s testTwigDevelopmentMode with data set "Twig development mode checked only"
Pass 8.139s testTwigDevelopmentMode with data set "Twig debug mode only, keep Twig cache"
Pass 4.100s testTwigDevelopmentMode with data set "Twig debug mode off, disable Twig cache"
Pass 3.838s testTwigDevelopmentMode with data set "No changes"
Pass 4.704s testDisabledRenderedOutputCacheBins
---- Drupal\FunctionalJavascriptTests\Ajax\FormValuesTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Pass 8.346s testSimpleAjaxFormValue with data set #0
Pass 6.270s testSimpleAjaxFormValue with data set #1
Pass 4.961s testSimpleAjaxFormValue with data set #2
Pass 4.618s testSimpleInvalidCallbacksAjaxFormValue
---- Drupal\Tests\file\FunctionalJavascript\FileFieldWidgetClaroThemeTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Pass 70.930s testMultiValuedWidget
Pass 4.217s testSingleValuedWidget
Pass 3.667s testUploadingMoreFilesThanAllowed
Pass 5.012s testWidgetDefaultVisibilitySettings
---- Drupal\Tests\views_ui\FunctionalJavascript\DisplayTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Pass 10.202s testAddDisplay
Pass 6.148s testRenameDisplayAdminName
Pass 5.652s testPageContextualLinks
Pass 6.525s testAddDisplayBlockTranslation
---- Drupal\Tests\ckeditor5\FunctionalJavascript\MediaLibraryTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Pass 14.575s testButton
Pass 7.612s testAllowedMediaTypes
Pass 8.920s testAlt
---- Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Pass 13.151s testEntityForm
Pass 7.599s testEntityView
Pass 8.068s testExtraFields
---- Drupal\FunctionalJavascriptTests\Tests\JSInteractionTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Pass 17.281s testNotClickable
Pass 12.950s testFieldValueNotSettable
Pass 4.112s testElementsInteraction
---- Drupal\Tests\settings_tray\FunctionalJavascript\SettingsTrayBlockFormTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Pass 44.969s testBlocks
Skipped 0.000s testEditModeEnableDisable
Pass 8.931s testValidationMessages
---- Drupal\Tests\views\FunctionalJavascript\PaginationAJAXTest ----
Status Duration Info
--------------------------------------------------------------------------------------------------------
Fail 13.048s testBasicPagination
Fail 6.658s testDefaultFilterPagination
Fail 7.011s testPaginationAjaxWithTitleFilter
Failure 27.559s *** Process execution output ***
PHPUnit 11.5.34 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.12
Configuration: /builds/issue/drupal-2823541/core/phpunit.xml.dist
FFF 3 / 3 (100%)
HTML output was generated.
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_views_FunctionalJavascript_PaginationAJAXTest-1-71423746.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_views_FunctionalJavascript_PaginationAJAXTest-2-71423746.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_views_FunctionalJavascript_PaginationAJAXTest-3-73948087.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_views_FunctionalJavascript_PaginationAJAXTest-4-73948087.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_views_FunctionalJavascript_PaginationAJAXTest-5-38173237.html
http://localhost/subdirectory/sites/simpletest/browser_output/Drupal_Tests_views_FunctionalJavascript_PaginationAJAXTest-6-38173237.html
Time: 00:27.329, Memory: 8.00 MB
Pagination AJAX (Drupal\Tests\views\FunctionalJavascript\PaginationAJAX)
✘ Basic pagination
┐
├ Failed asserting that two strings are equal.
┊ ---·Expected
┊ +++·Actual
┊ @@ @@
┊ -'?status=All&type=All&title=&items_per_page=5&order=changed&sort=asc&page=2'
┊ +'?status=All&type=All&title=&items_per_=&items_per_order=changed&sort=asc&items_per_page=5&order=changed&page=2'
│
│ /builds/issue/drupal-2823541/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php:116
┴
✘ Default filter pagination
┐
├ Failed asserting that two strings are equal.
┊ ---·Expected
┊ +++·Actual
┊ @@ @@
┊ -'...=default_value&items_per_page=5&order=changed&sort=asc&page=0'
┊ +'...=default_value&items_per_=&items_per_order=changed&sort=asc&items_per_page=5&order=changed&page=0'
│
│ /builds/issue/drupal-2823541/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php:200
┴
✘ Pagination ajax with title filter
┐
├ Failed asserting that '\n
├ No content available. \n
├ ' [ASCII](length: 116) contains "Node 11 content" [ASCII](length: 15).
│
│ /builds/issue/drupal-2823541/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php:278
┴
FAILURES!
Tests: 3, Assertions: 135, Failures: 3.
---- Drupal\FunctionalJavascriptTests\Ajax\AjaxFormImageButtonTest ----
One of the assertions that is failing here is at lines 115- 116 in PaginationAJAXTest.php:
// Test that no unwanted parameters are added to the URL.
$this->assertEquals('?status=All&type=All&title=&items_per_page=5&order=changed&sort=asc&page=2', $link->getAttribute('href'));
Re: #3:
I thought about this some more; we already allow ['#attached']['html_head'] to add things to , so why not allow ['#attached']['page_top'] to put things in the page top?
There are lots of good reasons to 'add things to ' whatever PHP framework you are using. I think that having a piece of the page dedicated to the node preview form was originally because it was felt that the importance of the form markup was sufficient to justify it getting 'red carpet treatment' ie special real estate on the page?
I am not quite sure if the net effect of the refactoring is that node preview form will lose its special status or if there will be a danger of it competing with other markup that might affect UX?
@smustgrave The 3 months has now elapsed. I am going to set this to 'Needs work', the work being to remove the @todo at lines 31- 32 from core/modules/language/language.api.php
then the issue should be closed?
Re: #12
So when we make the deprecated module text_with_summary
Just trying to get my head around the strategies described in this issue. Are you talking about creating a module named 'text_with_summary'? I suppose you mean deprecating the field type 'text_with_summary'?
The steps to reproduce need to be redefined. They illustrate the problem currently.
Re: #15:
A core test is usually written using the steps to reproduce. But core does use contrib for testing, a testing theme would have to be used. There is test_subsubtheme in core. I am not familiar with theme tests but maybe that could be used.
It looks like test coverage could involve core/tests/Drupal/Tests/Core/Theme/RegistryTest.php and/ or core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
There is also a test module for themes:
core/modules/system/tests/modules/theme_test
Both branches now have test coverage.
This one: https://git.drupalcode.org/issue/drupal-3505182/-/tree/3505182-11x-with-... by @Abhijith S includes a full on test entity as in custom content entity. But I cannot trigger the 'test-only' test on it. It tells me I do not have the permissions. Any chance you could trigger it @Abhijith S? And paste the output in a comment?
I tried have added test coverage to the other branch: https://git.drupalcode.org/issue/drupal-3505182/-/tree/3505182-an-entity... using an article node, not a custom content entity, by adding a few lines to an existing text.
But the test is passing. The page is loaded with 200 so no error. And the error text reported in the IS is not appearing on the page inside the test. So again the assertion is passing when it should fail.
Can anyone see why my test is not working? Does an article node not count as an 'entity' in this issue? Does it have to be a 'proper' custom content entity? If so, then the branches could be merged? And see if the test coverage by @Abhijith S does its job?
RE: #67 and #68 Thank you for the interesting insight into caching!
Test-only output is:
PHPUnit 11.5.39 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3496369/core/phpunit.xml.dist
... 3 / 3 (100%)
Time: 00:15.570, Memory: 8.00 MB
OK (3 tests, 101 assertions)
HTML output directory sites/simpletest/browser_output is not a writable directory.
PHPUnit 11.5.39 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3496369/core/phpunit.xml.dist
....F.FFF 9 / 9 (100%)
Time: 00:00.045, Memory: 8.00 MB
There were 4 failures:
1) Drupal\Tests\path_alias\Unit\AliasManagerTest::testGetAliasByPathNoMatch
Expectation failed for method name is "preloadPathAlias" when invoked 1 time.
Method was expected to be called 1 time, actually called 0 times.
2) Drupal\Tests\path_alias\Unit\AliasManagerTest::testGetAliasByPathMatch
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'zmy5ftyv'
+'/btvca5ai/z1vdkxvv'
/builds/issue/drupal-3496369/core/modules/path_alias/tests/src/Unit/AliasManagerTest.php:240
3) Drupal\Tests\path_alias\Unit\AliasManagerTest::testGetAliasByPathCachedMissLanguage
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'ps3dog2l'
+'/lxty5dwo/pupjuu3x'
/builds/issue/drupal-3496369/core/modules/path_alias/tests/src/Unit/AliasManagerTest.php:272
4) Drupal\Tests\path_alias\Unit\AliasManagerTest::testCacheClear
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'/alias'
+'/path'
/builds/issue/drupal-3496369/core/modules/path_alias/tests/src/Unit/AliasManagerTest.php:295
FAILURES!
Tests: 9, Assertions: 39, Failures: 4.
HTML output directory sites/simpletest/browser_output is not a writable directory.
PHPUnit 11.5.39 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3496369/core/phpunit.xml.dist
... 3 / 3 (100%)
Time: 00:21.185, Memory: 8.00 MB
OK (3 tests, 119 assertions)
HTML output directory sites/simpletest/browser_output is not a writable directory.
PHPUnit 11.5.39 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3496369/core/phpunit.xml.dist
.F 2 / 2 (100%)
Time: 01:41.178, Memory: 10.00 MB
There was 1 failure:
1) Drupal\Tests\demo_umami\FunctionalJavascript\OpenTelemetryAuthenticatedPerformanceTest::testNodePageAdministrator
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
Array &0 [
- 'QueryCount' => 542,
- 'CacheGetCount' => 565,
+ 'QueryCount' => 549,
+ 'CacheGetCount' => 566,
'CacheGetCountByBin' => Array &1 [
'config' => 221,
'bootstrap' => 23,
'discovery' => 113,
- 'data' => 71,
+ 'data' => 72,
'dynamic_page_cache' => 2,
'default' => 45,
'entity' => 23,
@@ @@
'render' => 39,
'menu' => 28,
],
- 'CacheSetCount' => 474,
+ 'CacheSetCount' => 475,
'CacheDeleteCount' => 0,
'CacheTagInvalidationCount' => 0,
'CacheTagLookupQueryCount' => 47,
/builds/issue/drupal-3496369/core/tests/Drupal/Tests/PerformanceTestTrait.php:689
/builds/issue/drupal-3496369/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryAuthenticatedPerformanceTest.php:121
FAILURES!
Tests: 2, Assertions: 26, Failures: 1.
HTML output directory sites/simpletest/browser_output is not a writable directory.
PHPUnit 11.5.39 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3496369/core/phpunit.xml.dist
F 1 / 1 (100%)
Time: 00:48.511, Memory: 10.00 MB
There was 1 failure:
1) Drupal\Tests\demo_umami\FunctionalJavascript\OpenTelemetryFrontPagePerformanceTest::testFrontPagePerformance
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
Array &0 [
- 'QueryCount' => 380,
- 'CacheGetCount' => 471,
- 'CacheSetCount' => 466,
+ 'QueryCount' => 381,
+ 'CacheGetCount' => 472,
+ 'CacheSetCount' => 467,
'CacheDeleteCount' => 0,
'CacheTagLookupQueryCount' => 49,
'CacheTagInvalidationCount' => 0,
/builds/issue/drupal-3496369/core/tests/Drupal/Tests/PerformanceTestTrait.php:689
/builds/issue/drupal-3496369/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php:66
/builds/issue/drupal-3496369/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php:31
FAILURES!
Tests: 1, Assertions: 10, Failures: 1.
HTML output directory sites/simpletest/browser_output is not a writable directory.
PHPUnit 11.5.39 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.13
Configuration: /builds/issue/drupal-3496369/core/phpunit.xml.dist
F 1 / 1 (100%)
Time: 00:36.928, Memory: 10.00 MB
There was 1 failure:
1) Drupal\Tests\demo_umami\FunctionalJavascript\OpenTelemetryNodePagePerformanceTest::testNodePage
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
Array &0 [
- 'QueryCount' => 457,
- 'CacheSetCount' => 440,
+ 'QueryCount' => 458,
+ 'CacheSetCount' => 441,
'CacheDeleteCount' => 0,
'CacheTagLookupQueryCount' => 43,
'CacheTagInvalidationCount' => 0,
/builds/issue/drupal-3496369/core/tests/Drupal/Tests/PerformanceTestTrait.php:689
/builds/issue/drupal-3496369/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php:68
/builds/issue/drupal-3496369/core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php:32
FAILURES!
Tests: 1, Assertions: 10, Failures: 1.
Exiting with EXIT_CODE=1
I do not fully understand it but it looks good to me.
This test is currently failing and looks to be related:
https://git.drupalcode.org/issue/drupal-2971390/-/jobs/6672789
Media Translation UI (Drupal\Tests\media\Functional\MediaTranslationUI)
✘ Translation u i
┐
├ Behat\Mink\Exception\ElementNotFoundException: Form field with id|name|label|value "content_translation[uid]" not found.
│
│ /builds/issue/drupal-2971390/vendor/behat/mink/src/WebAssert.php:731
│ /builds/issue/drupal-2971390/core/tests/Drupal/Tests/UiHelperTrait.php:94
│ /builds/issue/drupal-2971390/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php:364
│ /builds/issue/drupal-2971390/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php:63
┴
FAILURES!
Tests: 1, Assertions: 102, Failures: 1.
Not sure if this test needs to be fixed or if it reveals something needing fixed in ContentTranslationUITestBase.php?