You are here

public function Fast404Test::testIsPathBlocked in Fast 404 8

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

Tests checking if a path is blocked.

@covers ::isPathBlocked

File

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

Class

Fast404Test
Tests Fast404 methods.

Namespace

Drupal\Tests\fast404\Unit

Code

public function testIsPathBlocked() {
  $fast404 = $this
    ->getFast404();
  $this
    ->assertEquals(FALSE, $fast404
    ->isPathBlocked());

  // If CLI, return FALSE regardless.
  $fast404
    ->method('isCli')
    ->willReturn(TRUE);
  $this
    ->assertEquals(FALSE, $fast404
    ->isPathBlocked());
}