You are here

protected function UncaughtExceptionTest::assertResponse in Drupal 8

Asserts the page responds with the specified response code.

Parameters

int $code: Response code. For example 200 is a successful page request. For a list of all codes see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.

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

Overrides AssertLegacyTrait::assertResponse

9 calls to UncaughtExceptionTest::assertResponse()
UncaughtExceptionTest::testErrorContainer in core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
Tests a container which has an error.
UncaughtExceptionTest::testExceptionContainer in core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
Tests a container which has an exception really early.
UncaughtExceptionTest::testLoggerException in core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
Tests fallback to PHP error log when an exception is thrown while logging.
UncaughtExceptionTest::testLostDatabaseConnection in core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
Tests the case when the database connection is gone.
UncaughtExceptionTest::testMissingDependency in core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
Tests a missing dependency on a service.

... See full list

File

core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php, line 366

Class

UncaughtExceptionTest
Tests kernel panic when things are really messed up.

Namespace

Drupal\FunctionalTests\Bootstrap

Code

protected function assertResponse($code) {
  $this
    ->assertSame($code, $this->info['http_code']);
}