function RouterTest::testRouterResponsePsr7

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Routing/RouterTest.php \Drupal\Tests\system\Functional\Routing\RouterTest::testRouterResponsePsr7()
  2. 8.9.x core/modules/system/tests/src/Functional/Routing/RouterTest.php \Drupal\Tests\system\Functional\Routing\RouterTest::testRouterResponsePsr7()
  3. 10 core/modules/system/tests/src/Functional/Routing/RouterTest.php \Drupal\Tests\system\Functional\Routing\RouterTest::testRouterResponsePsr7()

Tests that a PSR-7 response works.

File

core/modules/system/tests/src/Functional/Routing/RouterTest.php, line 267

Class

RouterTest
Functional class for the full integrated routing system.

Namespace

Drupal\Tests\system\Functional\Routing

Code

public function testRouterResponsePsr7() : void {
    $this->drupalGet('/router_test/test23');
    $this->assertSession()
        ->statusCodeEquals(200);
    $this->assertSession()
        ->pageTextContains('test23');
}

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