You are here

public function MigrationStorageTest::testGetVariantIdsNoVariants 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::testGetVariantIdsNoVariants()

Tests getVariantIds() when no variants exist.

@covers ::getVariantIds

File

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

Class

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

Namespace

Drupal\Tests\migrate\Unit

Code

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