You are here

public function MigrateNodeCounterTest::testStatisticsSettings in Drupal 9

Same name in this branch
  1. 9 core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateNodeCounterTest.php \Drupal\Tests\statistics\Kernel\Migrate\d6\MigrateNodeCounterTest::testStatisticsSettings()
  2. 9 core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateNodeCounterTest.php \Drupal\Tests\statistics\Kernel\Migrate\d7\MigrateNodeCounterTest::testStatisticsSettings()
Same name and namespace in other branches
  1. 8 core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateNodeCounterTest.php \Drupal\Tests\statistics\Kernel\Migrate\d7\MigrateNodeCounterTest::testStatisticsSettings()

Tests migration of node counter.

File

core/modules/statistics/tests/src/Kernel/Migrate/d7/MigrateNodeCounterTest.php, line 49

Class

MigrateNodeCounterTest
Tests the migration of node counter data to Drupal 8.

Namespace

Drupal\Tests\statistics\Kernel\Migrate\d7

Code

public function testStatisticsSettings() {
  $this
    ->assertNodeCounter(1, 2, 0, 1421727536);
  $this
    ->assertNodeCounter(2, 1, 0, 1471428059);
  $this
    ->assertNodeCounter(4, 1, 1, 1478755275);

  // Tests that translated node counts include all translation counts.
  $this
    ->executeMigration('statistics_node_translation_counter');
  $this
    ->assertNodeCounter(2, 2, 0, 1471428153);
  $this
    ->assertNodeCounter(4, 2, 2, 1478755314);
}