You are here

public function SearchTest::testGetIndicator in Freelinking 4.0.x

Same name and namespace in other branches
  1. 8.3 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 81

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));
}