public function NodeTest::testGetIndicator in Freelinking 4.0.x
Same name and namespace in other branches
- 8.3 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\freelinkingCode
public function testGetIndicator($indicator, $expected) {
$this
->assertEquals($expected, preg_match($this->plugin
->getIndicator(), $indicator));
}