You are here

class TrustedHostsTestController in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/tests/modules/trusted_hosts_test/src/Controller/TrustedHostsTestController.php \Drupal\trusted_hosts_test\Controller\TrustedHostsTestController

Provides a test controller for testing the trusted hosts setting.

Hierarchy

Expanded class hierarchy of TrustedHostsTestController

File

core/modules/system/tests/modules/trusted_hosts_test/src/Controller/TrustedHostsTestController.php, line 14
Contains \Drupal\trusted_hosts_test\Controller\TrustedHostsTestController.

Namespace

Drupal\trusted_hosts_test\Controller
View source
class TrustedHostsTestController {

  /**
   * Creates a fake request and prints out its host.
   */
  public function fakeRequestHost() {
    $request = Request::create('/');
    return [
      '#markup' => 'Host: ' . $request
        ->getHost(),
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TrustedHostsTestController::fakeRequestHost public function Creates a fake request and prints out its host.