function MigrateStubTest::testCreateStub
Tests stub creation.
File
-
core/
modules/ migrate/ tests/ src/ Kernel/ MigrateStubTest.php, line 69
Class
- MigrateStubTest
- Tests the migrate.stub Service.
Namespace
Drupal\Tests\migrate\KernelCode
public function testCreateStub() {
$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.