You are here

public function Fast404PathTestCase::testPathCheck in Fast 404 7

File

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

Class

Fast404PathTestCase
Class Fast404PathTestCase

Code

public function testPathCheck() {

  // Ensure path check isn't activated by default.
  $this
    ->drupalGet('notdrupal');
  $this
    ->assertResponse(404);
  $this
    ->assertText('Create new account');

  // Turn on path check and detect fast_404 page.
  variable_set('fast_404_path_check', TRUE);
  $this
    ->drupalGet('notdrupal');
  $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 "/notdrupal" was not found on this server.</p></body></html>');
}