You are here

public function Fast404ExtensionTestCase::testExtensionCheck in Fast 404 7

File

./fast_404.test, line 28
Tests for fast_404.module.

Class

Fast404ExtensionTestCase
Class Fast404ExtensionTestCase

Code

public function testExtensionCheck() {
  $extensions = array(
    'jpg',
    'png',
    'txt',
  );
  foreach ($extensions as $ext) {
    $this
      ->drupalGet('unknownfile.' . $ext);
    $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.' . $ext . '" was not found on this server.</p></body></html>');
  }
}