protected function HttpResponseHeadersUITestCase::deleteHeaderRule in HTTP Response Headers 7
Deletes a rule with given rule ID.
Parameters
string $machine_name: A string rule ID.
1 call to HttpResponseHeadersUITestCase::deleteHeaderRule()
- HttpResponseHeadersUITestCase::testHeaderRuleAdminUI in modules/
http_response_headers_ui/ http_response_headers_ui.test - Test creating header rule.
File
- modules/
http_response_headers_ui/ http_response_headers_ui.test, line 267 - Tests for http_response_headers_ui.module.
Class
- HttpResponseHeadersUITestCase
- @file Tests for http_response_headers_ui.module.
Code
protected function deleteHeaderRule($machine_name) {
$this
->drupalGet('admin/config/system/http-response-headers');
$this
->clickLink(t('Delete'));
$this
->drupalPost('admin/config/system/http-response-headers/list/' . $machine_name . '/delete', array(), t('Delete'));
$this
->assertNoRaw($machine_name, 'Header rule no longer appears on page.');
}