You are here

public function YandexMetricsCounterTestCase::testCounterCodeDefault in Yandex.Metrics 7.3

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

Test counter code with default module settings.

File

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

Class

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

Code

public function testCounterCodeDefault() {

  // Test as Anonymous user.
  // Front page.
  $this
    ->drupalGet('');
  $this
    ->checkCounter();

  // 404 page.
  $this
    ->drupalGet('404');
  $this
    ->checkCounter();

  // Administration page.
  $this
    ->drupalGet('admin');
  $this
    ->checkNoCounter();

  // Login as administrator.
  $this
    ->drupalLogin($this->admin_user);

  // Front page.
  $this
    ->drupalGet('');
  $this
    ->checkCounter();

  // Administration page.
  $this
    ->drupalGet('admin/content');
  $this
    ->checkNoCounter();
}