Problem/Motivation

Replace all the occurrence of deprecated assertText() method

Proposed resolution

$this->assertSession()->responseContains() for non-HTML responses. Unlike the deprecated assertText()

$this->assertSession()->responseContains()

Comments

akshay_d created an issue. See original summary.

akshay_d’s picture

Status: Active » Needs review
StatusFileSize
new964 bytes

Replaced deprecated assertText() method

akshay_d’s picture

Please Review the patch.

maliknaik’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new4.95 KB

Patch #2 applies cleanly.

mile23’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new0 bytes
new1 KB

AssertLegacyTrait::assertText() is deprecated for removal in Drupal 10, but it's a worthwhile change.

CS changes, re-patched so the testbot can go.

mile23’s picture

Component: Batch Example » Other
Status: Needs review » Needs work

There are still a lot of usages of assertText() in BTB tests in Examples. Let's grab them all.

Lal_’s picture

Status: Needs work » Needs review
StatusFileSize
new7.73 KB
new6.91 KB

I hope this is it..

Status: Needs review » Needs work

The last submitted patch, 7: 3032673-7.patch, failed testing. View results

shubham.prakash’s picture

Status: Needs work » Needs review
StatusFileSize
new8.67 KB
jungle’s picture

Version: 8.x-1.x-dev » 3.x-dev

The default branch is 3.x-dev now, which is Drupal 9 compatible

Lal_’s picture

StatusFileSize
new6.65 KB

re-rolling according to the branch 3.x

Lal_’s picture

StatusFileSize
new10.47 KB

Adding interdiff

hmendes’s picture

StatusFileSize
new7.04 KB

Re-rolling patch.

jungle’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
jungle’s picture

Status: Needs work » Fixed
Issue tags: -Needs reroll

Checked with grep -nR "assertText" ., no more assertText() in the 3.x branch.

Instead of marking this Closed (outdated), changing it to Fixed for giving credit!

Thanks!

jungle’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.