You are here

public function NodeTitleTest::testGetIndicator in Freelinking 8.3

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

Assert that getIndicator is a pattern.

@dataProvider indicatorProvider

Parameters

string $test: The string to test the pattern against.

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

File

tests/src/Unit/Plugin/freelinking/NodeTitleTest.php, line 90

Class

NodeTitleTest
Tests the nodetitle plugin behavior.

Namespace

Drupal\Tests\freelinking\Unit\Plugin\freelinking

Code

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