Issue #3114617 by mondrake, longwave, Gábor Hojtsy, sja112, jungle, xjm: Properly deprecate methods in Drupal\FunctionalTests\AssertLegacyTrait and Drupal\KernelTests\AssertLegacyTrait, while still keeping deprecations silenced
parent
7ff11794e5
commit
758dfbcd85
|
@ -12,16 +12,10 @@ use Drupal\KernelTests\AssertLegacyTrait as BaseAssertLegacyTrait;
|
||||||
/**
|
/**
|
||||||
* Provides convenience methods for assertions in browser tests.
|
* Provides convenience methods for assertions in browser tests.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* the methods on \Drupal\Tests\WebAssert instead, for example
|
* the methods from \Drupal\Tests\WebAssert instead.
|
||||||
* @code
|
|
||||||
* $this->assertSession()->statusCodeEquals(200);
|
|
||||||
* @endcode
|
|
||||||
*
|
*
|
||||||
* @todo https://www.drupal.org/project/drupal/issues/3114617 Note that
|
* @see https://www.drupal.org/node/3129738
|
||||||
* deprecations in this file do not use the @ symbol in Drupal 8 because this
|
|
||||||
* will be removed in Drupal 10.0.0. Adding the @ back should re-enable coding
|
|
||||||
* standards checks.
|
|
||||||
*/
|
*/
|
||||||
trait AssertLegacyTrait {
|
trait AssertLegacyTrait {
|
||||||
|
|
||||||
|
@ -33,10 +27,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $css_selector
|
* @param string $css_selector
|
||||||
* The CSS selector identifying the element to check.
|
* The CSS selector identifying the element to check.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->elementExists() instead.
|
* $this->assertSession()->elementExists() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertElementPresent($css_selector) {
|
protected function assertElementPresent($css_selector) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertElementPresent() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->elementExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->elementExists('css', $css_selector);
|
$this->assertSession()->elementExists('css', $css_selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,10 +43,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $css_selector
|
* @param string $css_selector
|
||||||
* The CSS selector identifying the element to check.
|
* The CSS selector identifying the element to check.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->elementNotExists() instead.
|
* $this->assertSession()->elementNotExists() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertElementNotPresent($css_selector) {
|
protected function assertElementNotPresent($css_selector) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertElementNotPresent() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->elementNotExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->elementNotExists('css', $css_selector);
|
$this->assertSession()->elementNotExists('css', $css_selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,14 +62,17 @@ trait AssertLegacyTrait {
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* Plain text to look for.
|
* Plain text to look for.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* - $this->assertSession()->responseContains() for non-HTML responses,
|
* - $this->assertSession()->responseContains() for non-HTML responses,
|
||||||
* like XML or Json.
|
* like XML or Json.
|
||||||
* - $this->assertSession()->pageTextContains() for HTML responses. Unlike
|
* - $this->assertSession()->pageTextContains() for HTML responses. Unlike
|
||||||
* the deprecated assertText(), the passed text should be HTML decoded,
|
* the deprecated assertText(), the passed text should be HTML decoded,
|
||||||
* exactly as a human sees it in the browser.
|
* exactly as a human sees it in the browser.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertText($text) {
|
protected function assertText($text) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseContains() or $this->assertSession()->pageTextContains() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
// Cast MarkupInterface to string.
|
// Cast MarkupInterface to string.
|
||||||
$text = (string) $text;
|
$text = (string) $text;
|
||||||
|
|
||||||
|
@ -93,14 +96,17 @@ trait AssertLegacyTrait {
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* Plain text to look for.
|
* Plain text to look for.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* - $this->assertSession()->responseNotContains() for non-HTML responses,
|
* - $this->assertSession()->responseNotContains() for non-HTML responses,
|
||||||
* like XML or Json.
|
* like XML or Json.
|
||||||
* - $this->assertSession()->pageTextNotContains() for HTML responses.
|
* - $this->assertSession()->pageTextNotContains() for HTML responses.
|
||||||
* Unlike the deprecated assertNoText(), the passed text should be HTML
|
* Unlike the deprecated assertNoText(), the passed text should be HTML
|
||||||
* decoded, exactly as a human sees it in the browser.
|
* decoded, exactly as a human sees it in the browser.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNoText($text) {
|
protected function assertNoText($text) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNoText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseNotContains() or $this->assertSession()->pageTextNotContains() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
// Cast MarkupInterface to string.
|
// Cast MarkupInterface to string.
|
||||||
$text = (string) $text;
|
$text = (string) $text;
|
||||||
|
|
||||||
|
@ -126,8 +132,15 @@ trait AssertLegacyTrait {
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* TRUE on pass, FALSE on fail.
|
* TRUE on pass, FALSE on fail.
|
||||||
|
*
|
||||||
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
|
* $this->assertSession()->pageTextContains() or
|
||||||
|
* $this->assertSession()->pageTextNotContains() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertTextHelper($text, $not_exists = TRUE) {
|
protected function assertTextHelper($text, $not_exists = TRUE) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->pageTextContains() or $this->assertSession()->pageTextNotContains() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$args = ['@text' => $text];
|
$args = ['@text' => $text];
|
||||||
$message = $not_exists ? new FormattableMarkup('"@text" not found', $args) : new FormattableMarkup('"@text" found', $args);
|
$message = $not_exists ? new FormattableMarkup('"@text" not found', $args) : new FormattableMarkup('"@text" found', $args);
|
||||||
|
|
||||||
|
@ -158,10 +171,13 @@ trait AssertLegacyTrait {
|
||||||
* (optional) A message to display with the assertion. Do not translate
|
* (optional) A message to display with the assertion. Do not translate
|
||||||
* messages with t(). If left blank, a default message will be displayed.
|
* messages with t(). If left blank, a default message will be displayed.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->getSession()->getPage()->getText() and substr_count() instead.
|
* $this->getSession()->getPage()->getText() and substr_count() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertUniqueText($text, $message = NULL) {
|
protected function assertUniqueText($text, $message = NULL) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertUniqueText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->getSession()->getPage()->getText() and substr_count() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
// Cast MarkupInterface objects to string.
|
// Cast MarkupInterface objects to string.
|
||||||
$text = (string) $text;
|
$text = (string) $text;
|
||||||
|
|
||||||
|
@ -184,10 +200,13 @@ trait AssertLegacyTrait {
|
||||||
* (optional) A message to display with the assertion. Do not translate
|
* (optional) A message to display with the assertion. Do not translate
|
||||||
* messages with t(). If left blank, a default message will be displayed.
|
* messages with t(). If left blank, a default message will be displayed.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->getSession()->getPage()->getText() and substr_count() instead.
|
* $this->getSession()->getPage()->getText() and substr_count() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNoUniqueText($text, $message = '') {
|
protected function assertNoUniqueText($text, $message = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNoUniqueText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->getSession()->getPage()->getText() and substr_count() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
// Cast MarkupInterface objects to string.
|
// Cast MarkupInterface objects to string.
|
||||||
$text = (string) $text;
|
$text = (string) $text;
|
||||||
|
|
||||||
|
@ -204,10 +223,13 @@ trait AssertLegacyTrait {
|
||||||
* Response code. For example 200 is a successful page request. For a list
|
* Response code. For example 200 is a successful page request. For a list
|
||||||
* of all codes see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.
|
* of all codes see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->statusCodeEquals() instead.
|
* $this->assertSession()->statusCodeEquals() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertResponse($code) {
|
protected function assertResponse($code) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertResponse() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->statusCodeEquals() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->statusCodeEquals($code);
|
$this->assertSession()->statusCodeEquals($code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,12 +243,15 @@ trait AssertLegacyTrait {
|
||||||
* to skip checking the actual value, while still checking that the field
|
* to skip checking the actual value, while still checking that the field
|
||||||
* exists.
|
* exists.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->fieldExists() or
|
* $this->assertSession()->fieldExists() or
|
||||||
* $this->assertSession()->buttonExists() or
|
* $this->assertSession()->buttonExists() or
|
||||||
* $this->assertSession()->fieldValueEquals() instead.
|
* $this->assertSession()->fieldValueEquals() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertFieldByName($name, $value = NULL) {
|
protected function assertFieldByName($name, $value = NULL) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertFieldByName() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldExists() or $this->assertSession()->buttonExists() or $this->assertSession()->fieldValueEquals() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertFieldByXPath($this->constructFieldXpath('name', $name), $value);
|
$this->assertFieldByXPath($this->constructFieldXpath('name', $name), $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,12 +266,15 @@ trait AssertLegacyTrait {
|
||||||
* value, while still checking that the field does not exist. However, the
|
* value, while still checking that the field does not exist. However, the
|
||||||
* default value ('') asserts that the field value is not an empty string.
|
* default value ('') asserts that the field value is not an empty string.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->fieldNotExists() or
|
* $this->assertSession()->fieldNotExists() or
|
||||||
* $this->assertSession()->buttonNotExists() or
|
* $this->assertSession()->buttonNotExists() or
|
||||||
* $this->assertSession()->fieldValueNotEquals() instead.
|
* $this->assertSession()->fieldValueNotEquals() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNoFieldByName($name, $value = '') {
|
protected function assertNoFieldByName($name, $value = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNoFieldByName() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldNotExists() or $this->assertSession()->buttonNotExists() or $this->assertSession()->fieldValueNotEquals() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertNoFieldByXPath($this->constructFieldXpath('name', $name), $value);
|
$this->assertNoFieldByXPath($this->constructFieldXpath('name', $name), $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,12 +291,15 @@ trait AssertLegacyTrait {
|
||||||
*
|
*
|
||||||
* @throws \Behat\Mink\Exception\ElementNotFoundException
|
* @throws \Behat\Mink\Exception\ElementNotFoundException
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->fieldExists() or
|
* $this->assertSession()->fieldExists() or
|
||||||
* $this->assertSession()->buttonExists() or
|
* $this->assertSession()->buttonExists() or
|
||||||
* $this->assertSession()->fieldValueEquals() instead.
|
* $this->assertSession()->fieldValueEquals() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertFieldById($id, $value = '') {
|
protected function assertFieldById($id, $value = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertFieldById() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldExists() or $this->assertSession()->buttonExists() or $this->assertSession()->fieldValueEquals() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertFieldByXPath($this->constructFieldXpath('id', $id), $value);
|
$this->assertFieldByXPath($this->constructFieldXpath('id', $id), $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,11 +309,14 @@ trait AssertLegacyTrait {
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* Name or ID of field to assert.
|
* Name or ID of field to assert.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->fieldExists() or
|
* $this->assertSession()->fieldExists() or
|
||||||
* $this->assertSession()->buttonExists() instead.
|
* $this->assertSession()->buttonExists() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertField($field) {
|
protected function assertField($field) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertField() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldExists() or $this->assertSession()->buttonExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertFieldByXPath($this->constructFieldXpath('name', $field) . '|' . $this->constructFieldXpath('id', $field));
|
$this->assertFieldByXPath($this->constructFieldXpath('name', $field) . '|' . $this->constructFieldXpath('id', $field));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,11 +326,14 @@ trait AssertLegacyTrait {
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* Name or ID of field to assert.
|
* Name or ID of field to assert.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->fieldNotExists() or
|
* $this->assertSession()->fieldNotExists() or
|
||||||
* $this->assertSession()->buttonNotExists() instead.
|
* $this->assertSession()->buttonNotExists() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNoField($field) {
|
protected function assertNoField($field) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNoField() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldNotExists() or $this->assertSession()->buttonNotExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertNoFieldByXPath($this->constructFieldXpath('name', $field) . '|' . $this->constructFieldXpath('id', $field));
|
$this->assertNoFieldByXPath($this->constructFieldXpath('name', $field) . '|' . $this->constructFieldXpath('id', $field));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,10 +345,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $raw
|
* @param string $raw
|
||||||
* Raw (HTML) string to look for.
|
* Raw (HTML) string to look for.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->responseContains() instead.
|
* $this->assertSession()->responseContains() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertRaw($raw) {
|
protected function assertRaw($raw) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertRaw() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseContains() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->responseContains($raw);
|
$this->assertSession()->responseContains($raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,10 +363,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $raw
|
* @param string $raw
|
||||||
* Raw (HTML) string to look for.
|
* Raw (HTML) string to look for.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->responseNotContains() instead.
|
* $this->assertSession()->responseNotContains() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNoRaw($raw) {
|
protected function assertNoRaw($raw) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNoRaw() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseNotContains() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->responseNotContains($raw);
|
$this->assertSession()->responseNotContains($raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,10 +379,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $expected_title
|
* @param string $expected_title
|
||||||
* The string the page title should be.
|
* The string the page title should be.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->titleEquals() instead.
|
* $this->assertSession()->titleEquals() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertTitle($expected_title) {
|
protected function assertTitle($expected_title) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertTitle() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->titleEquals() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
// Cast MarkupInterface to string.
|
// Cast MarkupInterface to string.
|
||||||
$expected_title = (string) $expected_title;
|
$expected_title = (string) $expected_title;
|
||||||
return $this->assertSession()->titleEquals($expected_title);
|
return $this->assertSession()->titleEquals($expected_title);
|
||||||
|
@ -355,10 +401,13 @@ trait AssertLegacyTrait {
|
||||||
* @param int $index
|
* @param int $index
|
||||||
* Link position counting from zero.
|
* Link position counting from zero.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->linkExists() instead.
|
* $this->assertSession()->linkExists() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertLink($label, $index = 0) {
|
protected function assertLink($label, $index = 0) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertLink() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
return $this->assertSession()->linkExists($label, $index);
|
return $this->assertSession()->linkExists($label, $index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,10 +417,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string|\Drupal\Component\Render\MarkupInterface $label
|
* @param string|\Drupal\Component\Render\MarkupInterface $label
|
||||||
* Text between the anchor tags.
|
* Text between the anchor tags.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->linkNotExists() instead.
|
* $this->assertSession()->linkNotExists() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNoLink($label) {
|
protected function assertNoLink($label) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNoLink() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkNotExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
return $this->assertSession()->linkNotExists($label);
|
return $this->assertSession()->linkNotExists($label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,10 +435,13 @@ trait AssertLegacyTrait {
|
||||||
* @param int $index
|
* @param int $index
|
||||||
* Link position counting from zero.
|
* Link position counting from zero.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->linkByHrefExists() instead.
|
* $this->assertSession()->linkByHrefExists() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertLinkByHref($href, $index = 0) {
|
protected function assertLinkByHref($href, $index = 0) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertLinkByHref() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkByHrefExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->linkByHrefExists($href, $index);
|
$this->assertSession()->linkByHrefExists($href, $index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,10 +451,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $href
|
* @param string $href
|
||||||
* The full or partial value of the 'href' attribute of the anchor tag.
|
* The full or partial value of the 'href' attribute of the anchor tag.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->linkByHrefNotExists() instead.
|
* $this->assertSession()->linkByHrefNotExists() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNoLinkByHref($href) {
|
protected function assertNoLinkByHref($href) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNoLinkByHref() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkByHrefNotExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->linkByHrefNotExists($href);
|
$this->assertSession()->linkByHrefNotExists($href);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,12 +474,15 @@ trait AssertLegacyTrait {
|
||||||
*
|
*
|
||||||
* @throws \Behat\Mink\Exception\ExpectationException
|
* @throws \Behat\Mink\Exception\ExpectationException
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->fieldNotExists() or
|
* $this->assertSession()->fieldNotExists() or
|
||||||
* $this->assertSession()->buttonNotExists() or
|
* $this->assertSession()->buttonNotExists() or
|
||||||
* $this->assertSession()->fieldValueNotEquals() instead.
|
* $this->assertSession()->fieldValueNotEquals() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNoFieldById($id, $value = '') {
|
protected function assertNoFieldById($id, $value = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNoFieldById() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldNotExists() or $this->assertSession()->buttonNotExists() or $this->assertSession()->fieldValueNotEquals() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertNoFieldByXPath($this->constructFieldXpath('id', $id), $value);
|
$this->assertNoFieldByXPath($this->constructFieldXpath('id', $id), $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,10 +492,13 @@ trait AssertLegacyTrait {
|
||||||
* @param \Drupal\Core\Url|string $path
|
* @param \Drupal\Core\Url|string $path
|
||||||
* The expected system path or URL.
|
* The expected system path or URL.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->addressEquals() instead.
|
* $this->assertSession()->addressEquals() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertUrl($path) {
|
protected function assertUrl($path) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertUrl() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->addressEquals() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->addressEquals($path);
|
$this->assertSession()->addressEquals($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -446,10 +510,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $option
|
* @param string $option
|
||||||
* Option to assert.
|
* Option to assert.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->optionExists() instead.
|
* $this->assertSession()->optionExists() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertOption($id, $option) {
|
protected function assertOption($id, $option) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertOption() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->optionExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
return $this->assertSession()->optionExists($id, $option);
|
return $this->assertSession()->optionExists($id, $option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,10 +528,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* The text for the option tag to assert.
|
* The text for the option tag to assert.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.4.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.4.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->optionExists() instead.
|
* $this->assertSession()->optionExists() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertOptionByText($id, $text) {
|
protected function assertOptionByText($id, $text) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertOptionByText() is deprecated in drupal:8.4.0 and is removed from drupal:10.0.0. Use $this->assertSession()->optionExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
return $this->assertSession()->optionExists($id, $text);
|
return $this->assertSession()->optionExists($id, $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,10 +546,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $option
|
* @param string $option
|
||||||
* Option to assert.
|
* Option to assert.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->optionNotExists() instead.
|
* $this->assertSession()->optionNotExists() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNoOption($id, $option) {
|
protected function assertNoOption($id, $option) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNoOption() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->optionNotExists() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
return $this->assertSession()->optionNotExists($id, $option);
|
return $this->assertSession()->optionNotExists($id, $option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -494,11 +567,14 @@ trait AssertLegacyTrait {
|
||||||
* (optional) A message to display with the assertion. Do not translate
|
* (optional) A message to display with the assertion. Do not translate
|
||||||
* messages with t(). If left blank, a default message will be displayed.
|
* messages with t(). If left blank, a default message will be displayed.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->optionExists() instead and check the
|
* $this->assertSession()->optionExists() instead and check the
|
||||||
* "selected" attribute yourself.
|
* "selected" attribute yourself.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertOptionSelected($id, $option, $message = NULL) {
|
protected function assertOptionSelected($id, $option, $message = NULL) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertOptionSelected() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->optionExists() instead and check the "selected" attribute. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$option_field = $this->assertSession()->optionExists($id, $option);
|
$option_field = $this->assertSession()->optionExists($id, $option);
|
||||||
$message = $message ?: "Option $option for field $id is selected.";
|
$message = $message ?: "Option $option for field $id is selected.";
|
||||||
$this->assertTrue($option_field->hasAttribute('selected'), $message);
|
$this->assertTrue($option_field->hasAttribute('selected'), $message);
|
||||||
|
@ -510,10 +586,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* ID of field to assert.
|
* ID of field to assert.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->checkboxChecked() instead.
|
* $this->assertSession()->checkboxChecked() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertFieldChecked($id) {
|
protected function assertFieldChecked($id) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertFieldChecked() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->checkboxChecked() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->checkboxChecked($id);
|
$this->assertSession()->checkboxChecked($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -523,10 +602,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* ID of field to assert.
|
* ID of field to assert.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->checkboxNotChecked() instead.
|
* $this->assertSession()->checkboxNotChecked() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNoFieldChecked($id) {
|
protected function assertNoFieldChecked($id) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNoFieldChecked() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->checkboxNotChecked() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->checkboxNotChecked($id);
|
$this->assertSession()->checkboxNotChecked($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -543,10 +625,13 @@ trait AssertLegacyTrait {
|
||||||
* (optional) A message to display with the assertion. Do not translate
|
* (optional) A message to display with the assertion. Do not translate
|
||||||
* messages with t().
|
* messages with t().
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->xpath() instead and check the values directly in the test.
|
* $this->xpath() instead and check the values directly in the test.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertFieldByXPath($xpath, $value = NULL, $message = '') {
|
protected function assertFieldByXPath($xpath, $value = NULL, $message = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertFieldByXPath() is deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use $this->xpath() instead and check the values directly in the test. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$fields = $this->xpath($xpath);
|
$fields = $this->xpath($xpath);
|
||||||
|
|
||||||
$this->assertFieldsByValue($fields, $value, $message);
|
$this->assertFieldsByValue($fields, $value, $message);
|
||||||
|
@ -566,10 +651,13 @@ trait AssertLegacyTrait {
|
||||||
*
|
*
|
||||||
* @throws \Behat\Mink\Exception\ExpectationException
|
* @throws \Behat\Mink\Exception\ExpectationException
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->xpath() instead and assert that the result is empty.
|
* $this->xpath() instead and assert that the result is empty.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNoFieldByXPath($xpath, $value = NULL, $message = '') {
|
protected function assertNoFieldByXPath($xpath, $value = NULL, $message = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNoFieldByXPath() is deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use $this->xpath() instead and assert that the result is empty. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$fields = $this->xpath($xpath);
|
$fields = $this->xpath($xpath);
|
||||||
|
|
||||||
if (!empty($fields)) {
|
if (!empty($fields)) {
|
||||||
|
@ -604,11 +692,14 @@ trait AssertLegacyTrait {
|
||||||
* (optional) A message to display with the assertion. Do not translate
|
* (optional) A message to display with the assertion. Do not translate
|
||||||
* messages with t().
|
* messages with t().
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use
|
||||||
* iteration over the fields yourself instead and directly check the values
|
* iteration over the fields yourself instead and directly check the values
|
||||||
* in the test.
|
* in the test.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertFieldsByValue($fields, $value = NULL, $message = '') {
|
protected function assertFieldsByValue($fields, $value = NULL, $message = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertFieldsByValue() is deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use iteration over the fields yourself instead and directly check the values in the test. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
// If value specified then check array for match.
|
// If value specified then check array for match.
|
||||||
$found = TRUE;
|
$found = TRUE;
|
||||||
if (isset($value)) {
|
if (isset($value)) {
|
||||||
|
@ -653,10 +744,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $raw
|
* @param string $raw
|
||||||
* Raw (HTML) string to look for.
|
* Raw (HTML) string to look for.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->assertEscaped() instead.
|
* $this->assertSession()->assertEscaped() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertEscaped($raw) {
|
protected function assertEscaped($raw) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertEscaped() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->assertEscaped() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->assertEscaped($raw);
|
$this->assertSession()->assertEscaped($raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -668,10 +762,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $raw
|
* @param string $raw
|
||||||
* Raw (HTML) string to look for.
|
* Raw (HTML) string to look for.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->assertNoEscaped() instead.
|
* $this->assertSession()->assertNoEscaped() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNoEscaped($raw) {
|
protected function assertNoEscaped($raw) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNoEscaped() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->assertNoEscaped() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->assertNoEscaped($raw);
|
$this->assertSession()->assertNoEscaped($raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -681,10 +778,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $pattern
|
* @param string $pattern
|
||||||
* Perl regex to look for including the regex delimiters.
|
* Perl regex to look for including the regex delimiters.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->responseMatches() instead.
|
* $this->assertSession()->responseMatches() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertPattern($pattern) {
|
protected function assertPattern($pattern) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertPattern() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseMatches() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->responseMatches($pattern);
|
$this->assertSession()->responseMatches($pattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -694,7 +794,7 @@ trait AssertLegacyTrait {
|
||||||
* @param string $pattern
|
* @param string $pattern
|
||||||
* Perl regex to look for including the regex delimiters.
|
* Perl regex to look for including the regex delimiters.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.4.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.4.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->responseNotMatches() instead.
|
* $this->assertSession()->responseNotMatches() instead.
|
||||||
*
|
*
|
||||||
* @see https://www.drupal.org/node/3129738
|
* @see https://www.drupal.org/node/3129738
|
||||||
|
@ -710,10 +810,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $expected_cache_tag
|
* @param string $expected_cache_tag
|
||||||
* The expected cache tag.
|
* The expected cache tag.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->responseHeaderContains() instead.
|
* $this->assertSession()->responseHeaderContains() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertCacheTag($expected_cache_tag) {
|
protected function assertCacheTag($expected_cache_tag) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertCacheTag() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseHeaderContains() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', $expected_cache_tag);
|
$this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', $expected_cache_tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -723,7 +826,7 @@ trait AssertLegacyTrait {
|
||||||
* @param string $cache_tag
|
* @param string $cache_tag
|
||||||
* The cache tag to check.
|
* The cache tag to check.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.4.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.4.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->responseHeaderNotContains() instead.
|
* $this->assertSession()->responseHeaderNotContains() instead.
|
||||||
*
|
*
|
||||||
* @see https://www.drupal.org/node/3129738
|
* @see https://www.drupal.org/node/3129738
|
||||||
|
@ -741,10 +844,13 @@ trait AssertLegacyTrait {
|
||||||
* @param string $value
|
* @param string $value
|
||||||
* Value of the header to assert
|
* Value of the header to assert
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->responseHeaderEquals() instead.
|
* $this->assertSession()->responseHeaderEquals() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertHeader($name, $value) {
|
protected function assertHeader($name, $value) {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertHeader() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseHeaderEquals() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSession()->responseHeaderEquals($name, $value);
|
$this->assertSession()->responseHeaderEquals($name, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -779,10 +885,13 @@ trait AssertLegacyTrait {
|
||||||
* @return string
|
* @return string
|
||||||
* An XPath query with arguments replaced.
|
* An XPath query with arguments replaced.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->assertSession()->buildXPathQuery() instead.
|
* $this->assertSession()->buildXPathQuery() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function buildXPathQuery($xpath, array $args = []) {
|
protected function buildXPathQuery($xpath, array $args = []) {
|
||||||
|
@trigger_error('AssertLegacyTrait::buildXPathQuery() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->buildXPathQuery() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
return $this->assertSession()->buildXPathQuery($xpath, $args);
|
return $this->assertSession()->buildXPathQuery($xpath, $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -797,10 +906,13 @@ trait AssertLegacyTrait {
|
||||||
* @return string
|
* @return string
|
||||||
* XPath for specified values.
|
* XPath for specified values.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.5.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.5.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->getSession()->getPage()->findField() instead.
|
* $this->getSession()->getPage()->findField() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function constructFieldXpath($attribute, $value) {
|
protected function constructFieldXpath($attribute, $value) {
|
||||||
|
@trigger_error('AssertLegacyTrait::constructFieldXpath() is deprecated in drupal:8.5.0 and is removed from drupal:10.0.0. Use $this->getSession()->getPage()->findField() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$xpath = '//textarea[@' . $attribute . '=:value]|//input[@' . $attribute . '=:value]|//select[@' . $attribute . '=:value]';
|
$xpath = '//textarea[@' . $attribute . '=:value]|//input[@' . $attribute . '=:value]|//select[@' . $attribute . '=:value]';
|
||||||
return $this->buildXPathQuery($xpath, [':value' => $value]);
|
return $this->buildXPathQuery($xpath, [':value' => $value]);
|
||||||
}
|
}
|
||||||
|
@ -808,7 +920,7 @@ trait AssertLegacyTrait {
|
||||||
/**
|
/**
|
||||||
* Gets the current raw content.
|
* Gets the current raw content.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use
|
||||||
* $this->getSession()->getPage()->getContent() instead.
|
* $this->getSession()->getPage()->getContent() instead.
|
||||||
*
|
*
|
||||||
* @see https://www.drupal.org/node/3129738
|
* @see https://www.drupal.org/node/3129738
|
||||||
|
@ -827,7 +939,7 @@ trait AssertLegacyTrait {
|
||||||
* @return \Behat\Mink\Element\NodeElement[]
|
* @return \Behat\Mink\Element\NodeElement[]
|
||||||
* Option elements in select.
|
* Option elements in select.
|
||||||
*
|
*
|
||||||
* Deprecated in drupal:8.5.0 and is removed from drupal:10.0.0. Use
|
* @deprecated in drupal:8.5.0 and is removed from drupal:10.0.0. Use
|
||||||
* $element->findAll('xpath', 'option') instead.
|
* $element->findAll('xpath', 'option') instead.
|
||||||
*
|
*
|
||||||
* @see https://www.drupal.org/node/3129738
|
* @see https://www.drupal.org/node/3129738
|
||||||
|
|
|
@ -8,72 +8,88 @@ namespace Drupal\KernelTests;
|
||||||
* Protected methods are custom. Public static methods override methods of
|
* Protected methods are custom. Public static methods override methods of
|
||||||
* \PHPUnit\Framework\Assert.
|
* \PHPUnit\Framework\Assert.
|
||||||
*
|
*
|
||||||
* Deprecated Scheduled for removal in Drupal 10.0.0. Use PHPUnit's native
|
* @deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use
|
||||||
* assert methods instead.
|
* PHPUnit's native assert methods instead.
|
||||||
*
|
*
|
||||||
* @todo https://www.drupal.org/project/drupal/issues/3031580 Note that
|
* @see https://www.drupal.org/node/3129738
|
||||||
* deprecations in this file do not use the @ symbol in Drupal 8 because this
|
|
||||||
* will be removed in Drupal 10.0.0.
|
|
||||||
*/
|
*/
|
||||||
trait AssertLegacyTrait {
|
trait AssertLegacyTrait {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see \Drupal\simpletest\TestBase::assert()
|
* @see \Drupal\simpletest\TestBase::assert()
|
||||||
*
|
*
|
||||||
* Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertTrue()
|
* @deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use
|
||||||
* instead.
|
* $this->assertTrue() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assert($actual, $message = '') {
|
protected function assert($actual, $message = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assert() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertTrue() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
parent::assertTrue((bool) $actual, $message);
|
parent::assertTrue((bool) $actual, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see \Drupal\simpletest\TestBase::assertEqual()
|
* @see \Drupal\simpletest\TestBase::assertEqual()
|
||||||
*
|
*
|
||||||
* Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertEquals()
|
* @deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use
|
||||||
* instead.
|
* $this->assertEquals() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertEqual($actual, $expected, $message = '') {
|
protected function assertEqual($actual, $expected, $message = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertEqual() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertEquals() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertEquals($expected, $actual, (string) $message);
|
$this->assertEquals($expected, $actual, (string) $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see \Drupal\simpletest\TestBase::assertNotEqual()
|
* @see \Drupal\simpletest\TestBase::assertNotEqual()
|
||||||
*
|
*
|
||||||
* Deprecated Scheduled for removal in Drupal 10.0.0. Use
|
* @deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use
|
||||||
* self::assertNotEquals() instead.
|
* $this->assertNotEquals() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNotEqual($actual, $expected, $message = '') {
|
protected function assertNotEqual($actual, $expected, $message = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNotEqual() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertNotEquals() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertNotEquals($expected, $actual, (string) $message);
|
$this->assertNotEquals($expected, $actual, (string) $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see \Drupal\simpletest\TestBase::assertIdentical()
|
* @see \Drupal\simpletest\TestBase::assertIdentical()
|
||||||
*
|
*
|
||||||
* Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertSame()
|
* @deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use
|
||||||
* instead.
|
* $this->assertSame() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertIdentical($actual, $expected, $message = '') {
|
protected function assertIdentical($actual, $expected, $message = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertIdentical() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertSame() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertSame($expected, $actual, (string) $message);
|
$this->assertSame($expected, $actual, (string) $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see \Drupal\simpletest\TestBase::assertNotIdentical()
|
* @see \Drupal\simpletest\TestBase::assertNotIdentical()
|
||||||
*
|
*
|
||||||
* Deprecated Scheduled for removal in Drupal 10.0.0. Use
|
* @deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use
|
||||||
* self::assertNotSame() instead.
|
* $this->assertNotSame() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertNotIdentical($actual, $expected, $message = '') {
|
protected function assertNotIdentical($actual, $expected, $message = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertNotIdentical() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertNotSame() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertNotSame($expected, $actual, (string) $message);
|
$this->assertNotSame($expected, $actual, (string) $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see \Drupal\simpletest\TestBase::assertIdenticalObject()
|
* @see \Drupal\simpletest\TestBase::assertIdenticalObject()
|
||||||
*
|
*
|
||||||
* Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertEquals()
|
* @deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use
|
||||||
* instead.
|
* $this->assertEquals() instead.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function assertIdenticalObject($actual, $expected, $message = '') {
|
protected function assertIdenticalObject($actual, $expected, $message = '') {
|
||||||
|
@trigger_error('AssertLegacyTrait::assertIdenticalObject() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertEquals() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
// Note: ::assertSame checks whether its the same object. ::assertEquals
|
// Note: ::assertSame checks whether its the same object. ::assertEquals
|
||||||
// though compares
|
// though compares
|
||||||
|
|
||||||
|
@ -83,10 +99,15 @@ trait AssertLegacyTrait {
|
||||||
/**
|
/**
|
||||||
* @see \Drupal\simpletest\TestBase::pass()
|
* @see \Drupal\simpletest\TestBase::pass()
|
||||||
*
|
*
|
||||||
* Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertTrue()
|
* @deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. PHPUnit
|
||||||
* instead.
|
* interrupts a test as soon as a test assertion fails, so there is usually
|
||||||
|
* no need to call this method. If a test's logic relies on this method,
|
||||||
|
* refactor the test.
|
||||||
|
*
|
||||||
|
* @see https://www.drupal.org/node/3129738
|
||||||
*/
|
*/
|
||||||
protected function pass($message) {
|
protected function pass($message) {
|
||||||
|
@trigger_error('AssertLegacyTrait::pass() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. PHPUnit interrupts a test as soon as a test assertion fails, so there is usually no need to call this method. If a test\'s logic relies on this method, refactor the test. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
|
||||||
$this->assertTrue(TRUE, $message);
|
$this->assertTrue(TRUE, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -166,6 +166,52 @@ trait DeprecationListenerTrait {
|
||||||
"The \"Drupal\Tests\Listeners\DrupalListener\" class implements \"PHPUnit\Framework\TestListener\" that is deprecated Use the `TestHook` interfaces instead.",
|
"The \"Drupal\Tests\Listeners\DrupalListener\" class implements \"PHPUnit\Framework\TestListener\" that is deprecated Use the `TestHook` interfaces instead.",
|
||||||
"The \"Drupal\Tests\Listeners\DrupalListener\" class uses \"PHPUnit\Framework\TestListenerDefaultImplementation\" that is deprecated The `TestListener` interface is deprecated.",
|
"The \"Drupal\Tests\Listeners\DrupalListener\" class uses \"PHPUnit\Framework\TestListenerDefaultImplementation\" that is deprecated The `TestListener` interface is deprecated.",
|
||||||
"The \"PHPUnit\Framework\TestSuite\" class is considered internal This class is not covered by the backward compatibility promise for PHPUnit. It may change without further notice. You should not use it from \"Drupal\Tests\TestSuites\TestSuiteBase\".",
|
"The \"PHPUnit\Framework\TestSuite\" class is considered internal This class is not covered by the backward compatibility promise for PHPUnit. It may change without further notice. You should not use it from \"Drupal\Tests\TestSuites\TestSuiteBase\".",
|
||||||
|
// Simpletest's legacy assertion methods.
|
||||||
|
'AssertLegacyTrait::assert() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertTrue() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertEqual() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertEquals() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNotEqual() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertNotEquals() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertIdentical() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertSame() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNotIdentical() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertNotSame() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertIdenticalObject() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertEquals() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::pass() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. PHPUnit interrupts a test as soon as a test assertion fails, so there is usually no need to call this method. If a test\'s logic relies on this method, refactor the test. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertElementPresent() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->elementExists() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertElementNotPresent() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->elementNotExists() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseContains() or $this->assertSession()->pageTextContains() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNoText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseNotContains() or $this->assertSession()->pageTextNotContains() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->pageTextContains() or $this->assertSession()->pageTextNotContains() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertUniqueText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->getSession()->getPage()->getText() and substr_count() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNoUniqueText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->getSession()->getPage()->getText() and substr_count() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertResponse() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->statusCodeEquals() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertFieldByName() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldExists() or $this->assertSession()->buttonExists() or $this->assertSession()->fieldValueEquals() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNoFieldByName() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldNotExists() or $this->assertSession()->buttonNotExists() or $this->assertSession()->fieldValueNotEquals() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertFieldById() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldExists() or $this->assertSession()->buttonExists() or $this->assertSession()->fieldValueEquals() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertField() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldExists() or $this->assertSession()->buttonExists() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNoField() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldNotExists() or $this->assertSession()->buttonNotExists() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertRaw() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseContains() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNoRaw() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseNotContains() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertTitle() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->titleEquals() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertLink() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkExists() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNoLink() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkNotExists() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertLinkByHref() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkByHrefExists() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNoLinkByHref() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkByHrefNotExists() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNoFieldById() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldNotExists() or $this->assertSession()->buttonNotExists() or $this->assertSession()->fieldValueNotEquals() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertUrl() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->addressEquals() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertOption() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->optionExists() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertOptionByText() is deprecated in drupal:8.4.0 and is removed from drupal:10.0.0. Use $this->assertSession()->optionExists() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNoOption() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->optionNotExists() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertOptionSelected() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->optionExists() instead and check the "selected" attribute. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertFieldChecked() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->checkboxChecked() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNoFieldChecked() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->checkboxNotChecked() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertFieldByXPath() is deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use $this->xpath() instead and check the values directly in the test. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNoFieldByXPath() is deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use $this->xpath() instead and assert that the result is empty. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertFieldsByValue() is deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use iteration over the fields yourself instead and directly check the values in the test. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertEscaped() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->assertEscaped() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertNoEscaped() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->assertNoEscaped() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertPattern() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseMatches() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertCacheTag() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseHeaderContains() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::assertHeader() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseHeaderEquals() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::buildXPathQuery() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->buildXPathQuery() instead. See https://www.drupal.org/node/3129738',
|
||||||
|
'AssertLegacyTrait::constructFieldXpath() is deprecated in drupal:8.5.0 and is removed from drupal:10.0.0. Use $this->getSession()->getPage()->findField() instead. See https://www.drupal.org/node/3129738',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue