#1939008: Convert theme_table() to Twig added a new assertTextPattern() method, but added it to one particular test class (core/modules/node/lib/Drupal/node/Tests/NodeTypeRenameConfigImportTest.php) versus a test base class, despite the fact that WebTestBase::assertPattern() does almost (but not quite) the same thing. It seems like a more general helper method, though it's a little hard to tell because the docs don't explain how/where you'd use it.

I still think assertTextPattern() is needs a) some clarification as to its purpose a) to be moved to a test base class, and/or c) the changes made "upstream" in the WebTestBase method.

TODO: Discuss/Fix those things. :)

Comments

sun’s picture

The method will be moved into the new AssertContentTrait. I'm generally not touching the moved code of methods though, so this is just to point out that the code will be located somewhere else very soon.

sun’s picture

Title: Fix up assertTextPattern() » Move NodeTypeRenameConfigImportTest::assertTextPattern() to AssertContentTrait
Assigned: Unassigned » sun
Status: Active » Postponed
Issue tags: +API addition
mgifford’s picture

@sun - has that move happened?

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Mile23’s picture

Assigned: sun » Unassigned
Status: Postponed » Closed (works as designed)

AssertContentTrait::assertTextPattern() does exist and is used by all of the various test bases that have content to assert against.