Mercurial > hg > cmmr2012-drupal-site
diff core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
line wrap: on
line diff
--- a/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Thu Feb 28 13:11:55 2019 +0000 +++ b/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php Thu May 09 15:34:47 2019 +0100 @@ -1,5 +1,5 @@ <?php - +// @codingStandardsIgnoreFile namespace Drupal\FunctionalTests; use Behat\Mink\Element\NodeElement; @@ -12,11 +12,16 @@ /** * Provides convenience methods for assertions in browser tests. * - * @deprecated Scheduled for removal in Drupal 9.0.0. Use the methods on + * Deprecated Scheduled for removal in Drupal 10.0.0. Use the methods on * \Drupal\Tests\WebAssert instead, for example * @code * $this->assertSession()->statusCodeEquals(200); * @endcode + * + * @todo https://www.drupal.org/project/drupal/issues/3031580 Note that + * 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 + * stanadrds checks. */ trait AssertLegacyTrait { @@ -28,7 +33,7 @@ * @param string $css_selector * The CSS selector identifying the element to check. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->elementExists() instead. */ protected function assertElementPresent($css_selector) { @@ -41,7 +46,7 @@ * @param string $css_selector * The CSS selector identifying the element to check. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->elementNotExists() instead. */ protected function assertElementNotPresent($css_selector) { @@ -57,7 +62,7 @@ * @param string $text * Plain text to look for. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use instead: * - $this->assertSession()->responseContains() for non-HTML responses, * like XML or Json. @@ -89,7 +94,7 @@ * @param string $text * Plain text to look for. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use instead: * - $this->assertSession()->responseNotContains() for non-HTML responses, * like XML or Json. @@ -155,7 +160,7 @@ * (optional) A message to display with the assertion. Do not translate * messages with t(). If left blank, a default message will be displayed. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->getSession()->getPage()->getText() and substr_count() instead. */ protected function assertUniqueText($text, $message = NULL) { @@ -181,7 +186,7 @@ * (optional) A message to display with the assertion. Do not translate * messages with t(). If left blank, a default message will be displayed. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->getSession()->getPage()->getText() and substr_count() instead. */ protected function assertNoUniqueText($text, $message = '') { @@ -201,7 +206,7 @@ * 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. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->statusCodeEquals() instead. */ protected function assertResponse($code) { @@ -218,7 +223,7 @@ * to skip checking the actual value, while still checking that the field * exists. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->fieldExists() or * $this->assertSession()->buttonExists() or * $this->assertSession()->fieldValueEquals() instead. @@ -238,7 +243,7 @@ * value, while still checking that the field does not exist. However, the * default value ('') asserts that the field value is not an empty string. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->fieldNotExists() or * $this->assertSession()->buttonNotExists() or * $this->assertSession()->fieldValueNotEquals() instead. @@ -260,7 +265,7 @@ * * @throws \Behat\Mink\Exception\ElementNotFoundException * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->fieldExists() or * $this->assertSession()->buttonExists() or * $this->assertSession()->fieldValueEquals() instead. @@ -275,7 +280,7 @@ * @param string $field * Name or ID of field to assert. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->fieldExists() or * $this->assertSession()->buttonExists() instead. */ @@ -289,7 +294,7 @@ * @param string $field * Name or ID of field to assert. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->fieldNotExists() or * $this->assertSession()->buttonNotExists() instead. */ @@ -305,7 +310,7 @@ * @param string $raw * Raw (HTML) string to look for. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->responseContains() instead. */ protected function assertRaw($raw) { @@ -320,7 +325,7 @@ * @param string $raw * Raw (HTML) string to look for. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->responseNotContains() instead. */ protected function assertNoRaw($raw) { @@ -333,7 +338,7 @@ * @param string $expected_title * The string the page title should be. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->titleEquals() instead. */ protected function assertTitle($expected_title) { @@ -352,7 +357,7 @@ * @param int $index * Link position counting from zero. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->linkExists() instead. */ protected function assertLink($label, $index = 0) { @@ -365,7 +370,7 @@ * @param string|\Drupal\Component\Render\MarkupInterface $label * Text between the anchor tags. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->linkNotExists() instead. */ protected function assertNoLink($label) { @@ -380,7 +385,7 @@ * @param int $index * Link position counting from zero. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->linkByHrefExists() instead. */ protected function assertLinkByHref($href, $index = 0) { @@ -393,7 +398,7 @@ * @param string $href * The full or partial value of the 'href' attribute of the anchor tag. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->linkByHrefNotExists() instead. */ protected function assertNoLinkByHref($href) { @@ -413,7 +418,7 @@ * * @throws \Behat\Mink\Exception\ExpectationException * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->fieldNotExists() or * $this->assertSession()->buttonNotExists() or * $this->assertSession()->fieldValueNotEquals() instead. @@ -428,7 +433,7 @@ * @param \Drupal\Core\Url|string $path * The expected system path or URL. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->addressEquals() instead. */ protected function assertUrl($path) { @@ -443,7 +448,7 @@ * @param string $option * Option to assert. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->optionExists() instead. */ protected function assertOption($id, $option) { @@ -458,7 +463,7 @@ * @param string $text * The text for the option tag to assert. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->optionExists() instead. */ protected function assertOptionByText($id, $text) { @@ -473,7 +478,7 @@ * @param string $option * Option to assert. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->optionNotExists() instead. */ protected function assertNoOption($id, $option) { @@ -491,7 +496,7 @@ * (optional) A message to display with the assertion. Do not translate * messages with t(). If left blank, a default message will be displayed. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->optionExists() instead and check the * "selected" attribute yourself. */ @@ -507,7 +512,7 @@ * @param string $id * ID of field to assert. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->checkboxChecked() instead. */ protected function assertFieldChecked($id) { @@ -520,7 +525,7 @@ * @param string $id * ID of field to assert. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->checkboxNotChecked() instead. */ protected function assertNoFieldChecked($id) { @@ -540,7 +545,7 @@ * (optional) A message to display with the assertion. Do not translate * messages with t(). * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->xpath() instead and check the values directly in the test. */ protected function assertFieldByXPath($xpath, $value = NULL, $message = '') { @@ -563,7 +568,7 @@ * * @throws \Behat\Mink\Exception\ExpectationException * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->xpath() instead and assert that the result is empty. */ protected function assertNoFieldByXPath($xpath, $value = NULL, $message = '') { @@ -601,7 +606,7 @@ * (optional) A message to display with the assertion. Do not translate * messages with t(). * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Iterate over the fields yourself instead and directly check the values in * the test. */ @@ -650,7 +655,7 @@ * @param string $raw * Raw (HTML) string to look for. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->assertEscaped() instead. */ protected function assertEscaped($raw) { @@ -665,7 +670,7 @@ * @param string $raw * Raw (HTML) string to look for. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->assertNoEscaped() instead. */ protected function assertNoEscaped($raw) { @@ -678,7 +683,7 @@ * @param string $pattern * Perl regex to look for including the regex delimiters. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->responseMatches() instead. */ protected function assertPattern($pattern) { @@ -691,7 +696,7 @@ * @param string $pattern * Perl regex to look for including the regex delimiters. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->responseNotMatches() instead. * * @see https://www.drupal.org/node/2864262 @@ -707,7 +712,7 @@ * @param string $expected_cache_tag * The expected cache tag. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->responseHeaderContains() instead. */ protected function assertCacheTag($expected_cache_tag) { @@ -720,7 +725,7 @@ * @param string $cache_tag * The cache tag to check. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->responseHeaderNotContains() instead. * * @see https://www.drupal.org/node/2864029 @@ -738,7 +743,7 @@ * @param string $value * Value of the header to assert * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->responseHeaderEquals() instead. */ protected function assertHeader($name, $value) { @@ -776,7 +781,7 @@ * @return string * An XPath query with arguments replaced. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->assertSession()->buildXPathQuery() instead. */ protected function buildXPathQuery($xpath, array $args = []) { @@ -794,7 +799,7 @@ * @return string * XPath for specified values. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->getSession()->getPage()->findField() instead. */ protected function constructFieldXpath($attribute, $value) { @@ -805,7 +810,7 @@ /** * Gets the current raw content. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $this->getSession()->getPage()->getContent() instead. */ protected function getRawContent() { @@ -822,7 +827,7 @@ * @return \Behat\Mink\Element\NodeElement[] * Option elements in select. * - * @deprecated Scheduled for removal in Drupal 9.0.0. + * Deprecated Scheduled for removal in Drupal 10.0.0. * Use $element->findAll('xpath', 'option') instead. */ protected function getAllOptions(NodeElement $element) {