function SystemAdminTestCase::testTrustedHostSettingsMessage
Test Trusted Host Settings message on the status report page.
File
-
modules/
system/ system.test, line 2944
Class
- SystemAdminTestCase
- Tests administrative overview pages.
Code
function testTrustedHostSettingsMessage() {
$this->drupalGet('admin/reports/status');
$this->assertText('The trusted_host_patterns setting is not configured in settings.php.');
$this->assertNoText('The trusted_host_patterns setting is set to allow');
variable_set('trusted_host_patterns', array(
'a_trusted_pattern',
'another_trusted_pattern',
));
$this->drupalGet('admin/reports/status');
$this->assertNoText('The trusted_host_patterns setting is not configured in settings.php.');
$this->assertText('The trusted_host_patterns setting is set to allow a_trusted_pattern, another_trusted_pattern');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.