public function MigrateStubTest::testCreateStub in Drupal 9
Same name in this branch
- 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()
Same name and namespace in other branches
- 8 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 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']));
}