::assertRaw() and ::assertText() are undefined in Drupal 10

Created on 18 September 2025, 5 days ago

Problem/Motivation

As described in Simpletest's legacy assertion methods are deprecated , methods like ::assertRaw() and ::assertText() have been deprecated in Drupal 9, and removed in Drupal 10. Running tests on Drupal 10 would cause the tests to fail.

Proposed resolution

  • Replace any call to $this->assertRaw() done in tests with $this->assertSession()->responseContains()
  • Replace any call to $this->assertText() done in tests with $this->assertSession()->responseContains() or $this->assertSession()->pageTextContains()
🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇮🇹Italy apaderno Brescia, 🇮🇹

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024