function AssertLegacyTrait::assertUrl

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertUrl()

Passes if the internal browser's URL matches the given path.

Parameters

\Drupal\Core\Url|string $path: The expected system path or URL.

Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->addressEquals() instead.

105 calls to AssertLegacyTrait::assertUrl()
AddFeedTest::testAddFeed in core/modules/aggregator/tests/src/Functional/AddFeedTest.php
Creates and ensures that a feed is unique, checks source, and deletes feed.
AdminTest::testCompactMode in core/modules/system/tests/src/Functional/System/AdminTest.php
Test compact mode.
AjaxFormCacheTest::testQueryString in core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php
Tests AJAX forms on pages with a query string.
BasicTest::testViewsWizardAndListing in core/modules/views/tests/src/Functional/Wizard/BasicTest.php
BlockContentRedirectTest::testRedirectDestination in core/modules/block_content/tests/src/Functional/Views/BlockContentRedirectTest.php
Tests the redirect destination when editing block content.

... See full list

File

core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php, line 437

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

protected function assertUrl($path) {
    $this->assertSession()
        ->addressEquals($path);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.