You are here

public function ExternalTest::testGetIndicator in Freelinking 8.3

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

Assert 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/ExternalTest.php, line 77

Class

ExternalTest
Tests the external plugin.

Namespace

Drupal\Tests\freelinking\Unit\Plugin\freelinking

Code

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