You are here

public function NodeTest::testGetIndicator in Freelinking 8.3

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

Assert that getIndicator method returns correct value.

@dataProvider indicatorProvider

Parameters

string $indicator: The indicator string to test.

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

File

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

Class

NodeTest
Tests the nid plugin.

Namespace

Drupal\Tests\freelinking\Unit\Plugin\freelinking

Code

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