You are here

public function MigrateNodeCounterTest::testStatisticsSettings in Drupal 10

Same name in this branch
  1. 10 core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateNodeCounterTest.php \Drupal\Tests\statistics\Kernel\Migrate\d6\MigrateNodeCounterTest::testStatisticsSettings()
  2. 10 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/d6/MigrateNodeCounterTest.php \Drupal\Tests\statistics\Kernel\Migrate\d6\MigrateNodeCounterTest::testStatisticsSettings()
  2. 9 core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateNodeCounterTest.php \Drupal\Tests\statistics\Kernel\Migrate\d6\MigrateNodeCounterTest::testStatisticsSettings()

Tests migration of node counter.

File

core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateNodeCounterTest.php, line 54

Class

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

Namespace

Drupal\Tests\statistics\Kernel\Migrate\d6

Code

public function testStatisticsSettings() {
  $this
    ->assertNodeCounter(1, 2, 0, 1421727536);
  $this
    ->assertNodeCounter(2, 1, 0, 1471428059);
  $this
    ->assertNodeCounter(3, 1, 0, 1471428153);
  $this
    ->assertNodeCounter(4, 1, 1, 1478755275);
  $this
    ->assertNodeCounter(5, 1, 1, 1478755314);
  $this
    ->assertNodeCounter(10, 5, 1, 1521137459);
  $this
    ->assertNodeCounter(12, 3, 0, 1521137469);

  // Tests that translated node counts include all translation counts.
  $this
    ->executeMigration('statistics_node_translation_counter');
  $this
    ->assertNodeCounter(10, 8, 2, 1521137463);
  $this
    ->assertNodeCounter(12, 5, 1, 1521137470);
}