public function DrupalOrgTest::testGetIndicator in Freelinking 8.3
Same name and namespace in other branches
- 4.0.x tests/src/Unit/Plugin/freelinking/DrupalOrgTest.php \Drupal\Tests\freelinking\Unit\Plugin\freelinking\DrupalOrgTest::testGetIndicator()
Assert that the indicator is functional.
@dataProvider indicatorProvider
Parameters
string $indicator: The indicator string.
array $settings: The settings to test.
int $expected: The expected value from preg_match.
File
- tests/
src/ Unit/ Plugin/ freelinking/ DrupalOrgTest.php, line 77
Class
- DrupalOrgTest
- Tests the drupalorg plugin.
Namespace
Drupal\Tests\freelinking\Unit\Plugin\freelinkingCode
public function testGetIndicator($indicator, array $settings, $expected) {
$plugin = $this
->getPlugin($settings);
$this
->assertEquals($expected, preg_match($plugin
->getIndicator(), $indicator));
}