You are here

public function YandexMetricsCounterTestCase::checkCounter in Yandex.Metrics 7.3

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

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

Return value

bool TRUE if counter code was found.

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

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