Commit e0f69cc3 authored by xjm's avatar xjm

Issue #1882788 by jabberwooki, keopx, joshi.rohit100, jhodgdon:...

Issue #1882788 by jabberwooki, keopx, joshi.rohit100, jhodgdon: assertText/assertNoText doesn't really show what you could see in the browser (bad docs)
parent 8adfd450
......@@ -483,11 +483,10 @@ protected function assertNoEscaped($raw, $message = '', $group = 'Other') {
}
/**
* Passes if the text IS found on the text version of the page.
* Passes if the page (with HTML stripped) contains the text.
*
* The text version is the equivalent of what a user would see when viewing
* through a web browser. In other words the HTML has been filtered out of the
* contents.
* Note that stripping HTML tags also removes their attributes, such as
* the values of text fields.
*
* @param string $text
* Plain text to look for.
......@@ -503,17 +502,18 @@ protected function assertNoEscaped($raw, $message = '', $group = 'Other') {
*
* @return bool
* TRUE on pass, FALSE on fail.
*
* @see \Drupal\simpletest\AssertContentTrait::assertRaw()
*/
protected function assertText($text, $message = '', $group = 'Other') {
return $this->assertTextHelper($text, $message, $group, FALSE);
}
/**
* Passes if the text is NOT found on the text version of the page.
* Passes if the page (with HTML stripped) does not contains the text.
*
* The text version is the equivalent of what a user would see when viewing
* through a web browser. In other words the HTML has been filtered out of the
* contents.
* Note that stripping HTML tags also removes their attributes, such as
* the values of text fields.
*
* @param string $text
* Plain text to look for.
......@@ -529,6 +529,8 @@ protected function assertText($text, $message = '', $group = 'Other') {
*
* @return bool
* TRUE on pass, FALSE on fail.
*
* @see \Drupal\simpletest\AssertContentTrait::assertNoRaw()
*/
protected function assertNoText($text, $message = '', $group = 'Other') {
return $this->assertTextHelper($text, $message, $group, TRUE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment