You are here

public function UrlValidatorTest::testUrlIsIndex in Mini site 8

Tests for urlIsIndex().

@dataProvider dataProviderUrlIsIndex @covers \Drupal\minisite\UrlValidator::urlIsIndex

File

tests/src/Kernel/UrlValidatorTest.php, line 116

Class

UrlValidatorTest
Class UrlValidatorTest.

Namespace

Drupal\Tests\minisite\Kernel

Code

public function testUrlIsIndex($url, $index_file, $is_index) {
  if ($index_file) {
    $actual = UrlValidator::urlIsIndex($url, $index_file);
  }
  else {
    $actual = UrlValidator::urlIsIndex($url);
  }
  $this
    ->assertEquals($is_index, $actual);
}