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. 10 core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationTest::testGetDestinationIds()
  3. 11.x 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 159

Class

MigrationTest
Tests the migration plugin.

Namespace

Drupal\Tests\migrate\Kernel\Plugin

Code

public function testGetDestinationIds() {
    $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.