public function TrustedHostsTest::testStatusPageWithoutConfiguration in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/System/TrustedHostsTest.php \Drupal\Tests\system\Functional\System\TrustedHostsTest::testStatusPageWithoutConfiguration()
- 9 core/modules/system/tests/src/Functional/System/TrustedHostsTest.php \Drupal\Tests\system\Functional\System\TrustedHostsTest::testStatusPageWithoutConfiguration()
Tests the status page behavior with no setting.
Checks that an error is shown when the trusted host setting is missing from settings.php
File
- core/
modules/ system/ tests/ src/ Functional/ System/ TrustedHostsTest.php, line 37
Class
- TrustedHostsTest
- Tests output on the status overview page.
Namespace
Drupal\Tests\system\Functional\SystemCode
public function testStatusPageWithoutConfiguration() {
$this
->drupalGet('admin/reports/status');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->pageTextContains("Trusted Host Settings");
$this
->assertSession()
->pageTextContains("The trusted_host_patterns setting is not configured in settings.php.");
}