public function ExternalTest::testGetIndicator in Freelinking 4.0.x
Same name and namespace in other branches
- 8.3 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 80
Class
- ExternalTest
- Tests the external plugin.
Namespace
Drupal\Tests\freelinking\Unit\Plugin\freelinkingCode
public function testGetIndicator($indicator, $expected) {
$plugin = $this
->getPlugin(FALSE);
$this
->assertEquals($expected, preg_match($plugin
->getIndicator(), $indicator));
}