public function MigrateStubTest::testCreateStubRawReturn in Drupal 8
Same name and namespace in other branches
- 9 core/modules/migrate/tests/src/Kernel/MigrateStubTest.php \Drupal\Tests\migrate\Kernel\MigrateStubTest::testCreateStubRawReturn()
Tests raw stub creation.
File
- core/
modules/ migrate/ tests/ src/ Kernel/ MigrateStubTest.php, line 78
Class
- MigrateStubTest
- Tests the migrate.stub Service.
Namespace
Drupal\Tests\migrate\KernelCode
public function testCreateStubRawReturn() {
$this
->assertSame([], $this->migrateLookup
->lookup('sample_stubbing_migration', [
17,
]));
$ids = $this->migrateStub
->createStub('sample_stubbing_migration', [
17,
], [], FALSE);
$this
->assertSame($ids, [
$this->migrateLookup
->lookup('sample_stubbing_migration', [
17,
])[0]['nid'],
]);
$this
->assertNotNull(\Drupal::entityTypeManager()
->getStorage('node')
->load($ids[0]));
}