Replace assertResponse(), fix declaring ::setUp without a void typehint

Created on 3 October 2023, over 1 year ago
Updated 5 October 2023, over 1 year ago

Fix tests at 8.x-1.x that fail in Gitlab pipelines due to use of deprecated functions.

AssertLegacyTrait::assertResponse() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->statusCodeEquals() instead. See https://www.drupal.org/node/3129738

4x in FormsTest::testFormAlterWithDeniedAccess
6x in TransitionAccessTest::testRestrictedTransitionAccess

Change Record https://www.drupal.org/node/3129738

Declaring ::setUp without a void return typehint in Drupal\Tests\scheduler_content_moderation_integration\Kernel\HookImplementationTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724

4x in Drupal\Tests\scheduler_content_moderation_integration\Kernel\HookImplementationTest
2x in Drupal\Tests\scheduler_content_moderation_integration\Kernel\PublishedStateConstraintTest
3x in Drupal\Tests\scheduler_content_moderation_integration\Kernel\UnPublishedStateConstraintTest

C.R. https://www.drupal.org/node/3114724

Deprecated NULL placeholder value for key (@label) in: "@label settings". This will throw a PHP error in drupal:11.0.0. See https://www.drupal.org/node/3318826

2x in ModeratedContentSchedulingTest::testPublishStateSchedule
1x in ModeratedContentSchedulingTest::testUnpublishStateSchedule
1x in ModeratedContentSchedulingTest::testPublishOfDraft

C.R. https://www.drupal.org/node/3318826

📌 Task
Status

Fixed

Version

1.0

Component

Testing

Created by

🇬🇧United Kingdom jonathan1055

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024