public function Fast404WhitelistTestCase::testWhitelist in Fast 404 7
File
- ./
fast_404.test, line 152 - Tests for fast_404.module.
Class
- Fast404WhitelistTestCase
- Class Fast404WhitelistTestCase
Code
public function testWhitelist() {
$this
->drupalGet('sitemap.xml');
$this
->assertResponse(404);
$this
->assertRaw('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "/sitemap.xml" was not found on this server.</p></body></html>');
variable_set('fast_404_string_whitelisting', array(
'sitemap.xml',
));
$this
->drupalGet('sitemap.xml');
$this
->assertResponse(404);
$this
->assertText('Create new account');
}