You are here

public function Fast404Test::testBlockPath in Fast 404 8.2

Same name and namespace in other branches
  1. 8 tests/src/Unit/Fast404Test.php \Drupal\Tests\fast404\Unit\Fast404Test::testBlockPath()

Tests blocking a path.

@covers ::blockPath

File

tests/src/Unit/Fast404Test.php, line 39

Class

Fast404Test
Tests Fast404 methods.

Namespace

Drupal\Tests\fast404\Unit

Code

public function testBlockPath() {
  $fast404 = $this
    ->getFast404();

  // Default value is FALSE for respond404.
  $this
    ->assertEquals(FALSE, $fast404
    ->isPathBlocked());
  $fast404
    ->blockPath();

  // A block path's value is TRUE for respond404.
  $this
    ->assertEquals(TRUE, $fast404
    ->isPathBlocked());
}