Commit f73194d0 authored by xjm's avatar xjm
Browse files

Issue #3139403 by mondrake: Replace usages of...

Issue #3139403 by mondrake: Replace usages of AssertLegacyTrait::assertElement(Not)Present, that is deprecated
parent 4e624628
......@@ -75,7 +75,7 @@ public function testActiveClass() {
// Verify the pager does not render on a list without pagination.
$this->drupalGet('admin/config/media/image-styles');
$this->assertElementNotPresent('.pager');
$this->assertSession()->elementNotExists('css', '.pager');
}
/**
......
......@@ -178,6 +178,30 @@ public function testAssertNoCacheTag() {
$this->assertNoCacheTag('some-cache-tag');
}
/**
* @covers ::assertElementPresent
* @expectedDeprecation 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
*/
public function testAssertElementPresent() {
$this->webAssert
->elementExists('css', '.pager')
->shouldBeCalled();
$this->assertElementPresent('.pager');
}
/**
* @covers ::assertElementNotPresent
* @expectedDeprecation 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
*/
public function testAssertElementNotPresent() {
$this->webAssert
->elementNotExists('css', '.pager')
->shouldBeCalled();
$this->assertElementNotPresent('.pager');
}
/**
* Returns a mocked behat session object.
*
......
......@@ -173,8 +173,6 @@ public static function getSkippedDeprecations() {
'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::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',
......
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