- Issue created by @jonathan1055
- last update
over 1 year ago 51 pass - @jonathan1055 opened merge request.
- Status changed to Needs review
over 1 year ago 2:53pm 1 October 2023 - 🇬🇧United Kingdom jonathan1055
The actual problem is only when using
assertequals()
on text that includes markup. As the html tags are not relevant to the tes, we can usestrip_tags()
to solve the problem. - last update
over 1 year ago 51 pass - 🇬🇧United Kingdom jonathan1055
Testing on drupal.org has
suppress-deprecations: true
and that is why we didn't see any test failures before. But the deprecation messages are shown in the log. https://dispatcher.drupalci.org/job/drupal_contrib/737940/consoleRunning with
suppress-deprecations: false
just to check that we get the same output in drupalCi testing. - last update
over 1 year ago 26 pass, 3 fail - 🇬🇧United Kingdom jonathan1055
The other problems found in the pipeline tests
strtolower(): Passing null to parameter #1 ($string)
and
Deprecated NULL placeholder value for key (@label) in: "@label settings"
are both caused by the same error. The fault only happens on the tests with the Node entity type, the tests on Media run fine. The problem is that the node content type was created without a 'name', the code incorrectly used a 'label' key when creating the entity type. The key 'label' is correct for media entity types, so that is why media was OK. - last update
over 1 year ago 32 pass, 2 fail - 🇬🇧United Kingdom jonathan1055
Drupal.org tests also have this deprecation
Calling Drupal\Tests\WebAssert::statusCodeEquals with more than one argument is deprecated in drupal:9.1.0 and will throw an \InvalidArgumentException in drupal:10.0.0. See https://www.drupal.org/node/3162537
CR https://www.drupal.org/node/3162537 →
It is easy to fix, but would be useful to know why GitLab did not also show this deprecation.
- last update
over 1 year ago 51 pass - last update
over 1 year ago 32 pass, 2 fail - last update
over 1 year ago 32 pass, 2 fail - 🇬🇧United Kingdom jonathan1055
Can't get the GitLab pipeline to report the deprecation error that DruplaCI is showing
Remaining self deprecation notices (12) Calling Drupal\Tests\WebAssert::statusCodeEquals with more than one argument is deprecated in drupal:9.1.0 and will throw an \InvalidArgumentException in drupal:10.0.0. See https://www.drupal.org/node/3162537
The Change Request says
It seems that the last bit " " has not actually been done, as they are still deprecation warnings at Core 10.1, not exceptions. - last update
over 1 year ago 51 pass - last update
over 1 year ago 51 pass - Status changed to Fixed
over 1 year ago 3:42pm 2 October 2023 - 🇬🇧United Kingdom jonathan1055
Merged. We will now have green passing tests on DrupalCI and GitLabCI.
- last update
over 1 year ago 51 pass -
jonathan1055 →
committed 8783a2c1 on 2.x
Issue #3390920 by jonathan1055: Remove markup in assertEquals(), fix...
-
jonathan1055 →
committed 8783a2c1 on 2.x
Automatically closed - issue fixed for 2 weeks with no activity.