public function WebAssert::addressNotEquals in Drupal 10
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/WebAssert.php \Drupal\Tests\WebAssert::addressNotEquals()
File
- core/
tests/ Drupal/ Tests/ WebAssert.php, line 735
Class
- WebAssert
- Defines a class with methods for asserting presence of elements during tests.
Namespace
Drupal\TestsCode
public function addressNotEquals($page) {
assert(func_num_args() === 1);
$expected = $this
->cleanUrl($page, TRUE);
$actual = $this
->cleanUrl($this->session
->getCurrentUrl(), strpos($expected, '?') !== FALSE);
$this
->assert($actual !== $expected, sprintf('Current page is "%s", but should not be.', $actual));
}