You are here

public function Fast404Test::testBlockPath in Fast 404 8

Same name and namespace in other branches
  1. 8.2 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
    ->assertAttributeEquals(FALSE, 'respond404', $fast404);
  $fast404
    ->blockPath();

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