public function Fast404ExtensionTestCase::testExtensionCustomisation in Fast 404 7
File
- ./
fast_404.test, line 44 - Tests for fast_404.module.
Class
- Fast404ExtensionTestCase
- Class Fast404ExtensionTestCase
Code
public function testExtensionCustomisation() {
$this
->drupalGet('unknownfile.doc');
$this
->assertResponse(404);
$this
->assertText('Create new account');
variable_set('fast_404_exts', '/^(?!robots).*\\.(doc|txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i');
$this
->drupalGet('unknownfile.doc');
$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 "/unknownfile.doc" was not found on this server.</p></body></html>');
}