You are here

function YandexMetricsCounterTestCase::checkCounter in Yandex.Metrics 7.2

Same name and namespace in other branches
  1. 7.3 yandex_metrics.test \YandexMetricsCounterTestCase::checkCounter()

Try to find Yandex.Metrics counter code on current page.

Return value

bool

3 calls to YandexMetricsCounterTestCase::checkCounter()
YandexMetricsCounterTestCase::testCounterCodeDefault in ./yandex_metrics.test
Test counter code with default module settings.
YandexMetricsCounterTestCase::testCounterCodePagesSettings in ./yandex_metrics.test
Test Yandex.Metrics page specific settings.
YandexMetricsCounterTestCase::testCounterCodeRolesSettings in ./yandex_metrics.test
Test Yandex.Metrics role specific settings.

File

./yandex_metrics.test, line 67
Tests for Yandex.Metrics Counter module.

Class

YandexMetricsCounterTestCase
Tests of functionality and settings of Yandex.Metrics Counter module.

Code

function checkCounter() {
  return $this
    ->assertPattern('@<div class="ym-counter">' . $this->yandex_metrics_code . '</div>@', 'Yandex.Metrica counter was outputed on page.');
}