function MigrateStubTest::testCreateStub
Same name in this branch
- 11.x core/modules/migrate/tests/src/Unit/MigrateStubTest.php \Drupal\Tests\migrate\Unit\MigrateStubTest::testCreateStub()
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/MigrateStubTest.php \Drupal\Tests\migrate\Unit\MigrateStubTest::testCreateStub()
- 9 core/modules/migrate/tests/src/Kernel/MigrateStubTest.php \Drupal\Tests\migrate\Kernel\MigrateStubTest::testCreateStub()
- 8.9.x core/modules/migrate/tests/src/Unit/MigrateStubTest.php \Drupal\Tests\migrate\Unit\MigrateStubTest::testCreateStub()
- 8.9.x core/modules/migrate/tests/src/Kernel/MigrateStubTest.php \Drupal\Tests\migrate\Kernel\MigrateStubTest::testCreateStub()
- 10 core/modules/migrate/tests/src/Unit/MigrateStubTest.php \Drupal\Tests\migrate\Unit\MigrateStubTest::testCreateStub()
- 10 core/modules/migrate/tests/src/Kernel/MigrateStubTest.php \Drupal\Tests\migrate\Kernel\MigrateStubTest::testCreateStub()
Tests stub creation.
File
-
core/
modules/ migrate/ tests/ src/ Kernel/ MigrateStubTest.php, line 71
Class
- MigrateStubTest
- Tests the migrate.stub Service.
Namespace
Drupal\Tests\migrate\KernelCode
public function testCreateStub() : void {
$this->assertSame([], $this->migrateLookup
->lookup('sample_stubbing_migration', [
17,
]));
$ids = $this->migrateStub
->createStub('sample_stubbing_migration', [
17,
]);
$this->assertSame([
$ids,
], $this->migrateLookup
->lookup('sample_stubbing_migration', [
17,
]));
$this->assertNotNull(\Drupal::entityTypeManager()->getStorage('node')
->load($ids['nid']));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.