Issue #3139403 by mondrake: Replace usages of AssertLegacyTrait::assertElement(Not)Present, that is deprecated
parent
4e62462808
commit
f73194d078
|
@ -75,7 +75,7 @@ class PagerTest extends BrowserTestBase {
|
||||||
|
|
||||||
// Verify the pager does not render on a list without pagination.
|
// Verify the pager does not render on a list without pagination.
|
||||||
$this->drupalGet('admin/config/media/image-styles');
|
$this->drupalGet('admin/config/media/image-styles');
|
||||||
$this->assertElementNotPresent('.pager');
|
$this->assertSession()->elementNotExists('css', '.pager');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -178,6 +178,30 @@ class AssertLegacyTraitTest extends UnitTestCase {
|
||||||
$this->assertNoCacheTag('some-cache-tag');
|
$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.
|
* Returns a mocked behat session object.
|
||||||
*
|
*
|
||||||
|
|
|
@ -173,8 +173,6 @@ trait DeprecationListenerTrait {
|
||||||
'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::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::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::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::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::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::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',
|
||||||
|
|
Loading…
Reference in New Issue