public function MigrateFieldInstanceTest::testMigrateFieldIntoUnknownNodeType in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/field/src/Tests/Migrate/d6/MigrateFieldInstanceTest.php \Drupal\field\Tests\Migrate\d6\MigrateFieldInstanceTest::testMigrateFieldIntoUnknownNodeType()
Tests migrating fields into non-existent content types.
File
- core/
modules/ field/ src/ Tests/ Migrate/ d6/ MigrateFieldInstanceTest.php, line 99 - Contains \Drupal\field\Tests\Migrate\d6\MigrateFieldInstanceTest.
Class
- MigrateFieldInstanceTest
- Migrate field instances.
Namespace
Drupal\field\Tests\Migrate\d6Code
public function testMigrateFieldIntoUnknownNodeType() {
$this->sourceDatabase
->delete('node_type')
->condition('type', 'test_planet')
->execute();
// The field migrations use the migration plugin to ensure that the node
// types exist, so this should produce no failures...
$this
->migrateFields();
// ...and the field instances should not have been migrated.
$this
->assertNull(FieldConfig::load('node.test_planet.field_multivalue'));
$this
->assertNull(FieldConfig::load('node.test_planet.field_test_text_single_checkbox'));
}