You are here

public function WikiTest::testGetIndicator in Freelinking 4.0.x

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

Asserts that getIndicator is functional.

@dataProvider indicatorProvider

Parameters

string $indicator: The indicator string.

int $expected: The expected output from preg_match().

File

tests/src/Unit/Plugin/freelinking/WikiTest.php, line 69

Class

WikiTest
Test the freelinking wiki 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));
}