protected function CounterTest::checkCounter in Yandex.Metrics 8.3
Try to find Yandex.Metrics counter code on current page.
Return value
bool
3 calls to CounterTest::checkCounter()
- CounterTest::testCounterCodeDefault in tests/
src/ Functional/ CounterTest.php - Test counter code with default module settings.
- CounterTest::testCounterCodePagesSettings in tests/
src/ Functional/ CounterTest.php - Test Yandex.Metrics page specific settings.
- CounterTest::testCounterCodeRolesSettings in tests/
src/ Functional/ CounterTest.php - Test Yandex.Metrics role specific settings.
File
- tests/
src/ Functional/ CounterTest.php, line 83 - Contains \Drupal\yandex_metrics\Tests\CounterTest.
Class
- CounterTest
- Tests of functionality and settings of Yandex.Metrics Counter module.
Namespace
Drupal\Tests\yandex_metrics\FunctionalCode
protected function checkCounter() {
return $this
->assertPattern('@<div class="ym-counter">' . $this->yandex_metrics_code . '</div>@', 'The given page has the Yandex.Metrics counter.');
}