You are here

public function PathAliasTest::testGetIndicator in Freelinking 4.0.x

Same name and namespace in other branches
  1. 8.3 tests/src/Unit/Plugin/freelinking/PathAliasTest.php \Drupal\Tests\freelinking\Unit\Plugin\freelinking\PathAliasTest::testGetIndicator()

Asserts that the indicator is functional.

@dataProvider indicatorProvider

Parameters

string $indicator: The indicator string.

int $expected: The expected value from preg_match.

File

tests/src/Unit/Plugin/freelinking/PathAliasTest.php, line 96

Class

PathAliasTest
Tests the path_alias plugin.

Namespace

Drupal\Tests\freelinking\Unit\Plugin\freelinking

Code

public function testGetIndicator($indicator, $expected) {
  $plugin = $this
    ->getPlugin();
  $this
    ->assertEquals($expected, preg_match($plugin
    ->getIndicator(), $indicator));
}