public function WebAssertArgumentsTest::testElementTextNotContains in Drupal 10
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Assert/WebAssertArgumentsTest.php \Drupal\Tests\Core\Assert\WebAssertArgumentsTest::testElementTextNotContains()
@covers ::elementTextNotContains
File
- core/
tests/ Drupal/ Tests/ Core/ Assert/ WebAssertArgumentsTest.php, line 433
Class
- WebAssertArgumentsTest
- Tests that calling WebAssert methods with extra arguments leads to errors.
Namespace
Drupal\Tests\Core\AssertCode
public function testElementTextNotContains() : void {
$this
->expectError(\AssertionError::class);
$element = $this
->prophesize(NodeElement::class);
$element
->getText()
->willReturn('bar');
$this->page
->find(Argument::any(), Argument::any())
->willReturn($element
->reveal());
$this->webAssert
->elementTextNotContains('xpath', '//foo', 'qux', 'Extra argument');
}