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