You are here

protected function RoutingTest::assertRouteStatusCode in XHProf 8

Asserts that URL returns expected HTTP status code.

Parameters

\Drupal\Core\Url $url: The URL to access.

int $code: Expected status code in response.

Throws

\Behat\Mink\Exception\ExpectationException When status code is not expected.

1 call to RoutingTest::assertRouteStatusCode()
RoutingTest::testRoutes in tests/src/Functional/RoutingTest.php
Tests access permissions to every route provided by the module.

File

tests/src/Functional/RoutingTest.php, line 67

Class

RoutingTest
Tests behaviors when visiting the reports and settings pages.

Namespace

Drupal\Tests\xhprof\Functional

Code

protected function assertRouteStatusCode(Url $url, int $code) {
  $this
    ->drupalGet($url);
  $this
    ->assertSession()
    ->statusCodeEquals($code);
}