You are here

protected function CounterTest::checkCounter in Yandex.Metrics 8.2

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

Return value

bool

3 calls to CounterTest::checkCounter()
CounterTest::testCounterCodeDefault in src/Tests/CounterTest.php
Test counter code with default module settings.
CounterTest::testCounterCodePagesSettings in src/Tests/CounterTest.php
Test Yandex.Metrics page specific settings.
CounterTest::testCounterCodeRolesSettings in src/Tests/CounterTest.php
Test Yandex.Metrics role specific settings.

File

src/Tests/CounterTest.php, line 89
Contains \Drupal\yandex_metrics\Tests\CounterTest.

Class

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

Namespace

Drupal\yandex_metrics\Tests

Code

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