You are here

public function MigrationStorageTest::testGetVariantIdsWithVariants in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/tests/src/Unit/MigrationStorageTest.php \Drupal\Tests\migrate\Unit\MigrationStorageTest::testGetVariantIdsWithVariants()

Tests getVariantIds() when variants exist.

@covers ::getVariantIds

File

core/modules/migrate/tests/src/Unit/MigrationStorageTest.php, line 61
Contains \Drupal\Tests\migrate\Unit\MigrationStorageTest.

Class

MigrationStorageTest
@coversDefaultClass \Drupal\migrate\MigrationStorage @group migrate

Namespace

Drupal\Tests\migrate\Unit

Code

public function testGetVariantIdsWithVariants() {
  $this->query
    ->method('execute')
    ->willReturn([
    'd6_node__page',
    'd6_node__article',
  ]);
  $ids = $this->storage
    ->getVariantIds([
    'd6_node:*',
    'd6_user',
  ]);
  $this
    ->assertSame([
    'd6_node__page',
    'd6_node__article',
    'd6_user',
  ], $ids);
}