function MigrationTest::testGetDestinationIds

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationTest::testGetDestinationIds()
  2. 8.9.x core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationTest::testGetDestinationIds()
  3. 10 core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationTest::testGetDestinationIds()

Tests Migration::getDestinationIds()

@covers ::getDestinationIds

File

core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php, line 143

Class

MigrationTest
Tests the migration plugin.

Namespace

Drupal\Tests\migrate\Kernel\Plugin

Code

public function testGetDestinationIds() : void {
    $migration = \Drupal::service('plugin.manager.migration')->createStubMigration([
        'destinationIds' => [
            'foo' => 'bar',
        ],
    ]);
    $destination_ids = $migration->getDestinationIds();
    $this->assertNotEmpty($destination_ids, 'Destination ids are not empty');
    $this->assertEquals([
        'foo' => 'bar',
    ], $destination_ids, 'Destination ids match the expected values.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.