You are here

public function SearchTest::testGetIndicator in Freelinking 8.3

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

Assert that indicator functions for both google and core search.

@dataProvider indicatorProvider

Parameters

string $indicator: The indicator string.

int $expected: The expected output from preg_match.

File

tests/src/Unit/Plugin/freelinking/SearchTest.php, line 78

Class

SearchTest
Tests the search plugin.

Namespace

Drupal\Tests\freelinking\Unit\Plugin\freelinking

Code

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