Remove markup in assertEquals() and fix strToLower NULL deprecations

Created on 1 October 2023, over 1 year ago
Updated 2 October 2023, over 1 year ago

Problem/Motivation

The current 2.x branch fails three phpunit tests with the following

1x: Using assert[Not]Equals() to compare markup between MarkupInterface
    objects and plain strings is deprecated in drupal:10.1.0 and will throw an
    error from drupal:11.0.0. Expected: 'The scheduled publishing state of
    archived is not a valid transition from the current moderation state of
    draft for this content.' - Actual 'The scheduled publishing state of
    archived is not a valid transition from the current moderation state of
    draft for this content.'. Use assert[Not]Same() and cast objects to string
    instead. See https://www.drupal.org/node/3334057

1x in PublishedStateConstraintTest::testInvalidPublishStateTransition

The linked Change Record https://www.drupal.org/node/3334057

2x: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
in ModeratedContentSchedulingTest::testPublishStateSchedule from Drupal\Tests\scheduler_content_moderation_integration\Kernel

2x: 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

Change record https://www.drupal.org/node/3318826

Steps to reproduce

See a recent branch pipeline result, e.g. scheduler_content_moderation_integration/-/jobs/133896

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

2.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