function MigrateFieldInstanceLabelDescriptionTest::migrateDumpAlter

Same name in this branch
  1. 10 core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php \Drupal\Tests\field\Kernel\Migrate\d7\MigrateFieldInstanceLabelDescriptionTest::migrateDumpAlter()
Same name in other branches
  1. 9 core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php \Drupal\Tests\field\Kernel\Migrate\d6\MigrateFieldInstanceLabelDescriptionTest::migrateDumpAlter()
  2. 9 core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php \Drupal\Tests\field\Kernel\Migrate\d7\MigrateFieldInstanceLabelDescriptionTest::migrateDumpAlter()
  3. 8.9.x core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php \Drupal\Tests\field\Kernel\Migrate\d6\MigrateFieldInstanceLabelDescriptionTest::migrateDumpAlter()
  4. 8.9.x core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php \Drupal\Tests\field\Kernel\Migrate\d7\MigrateFieldInstanceLabelDescriptionTest::migrateDumpAlter()
  5. 11.x core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php \Drupal\Tests\field\Kernel\Migrate\d6\MigrateFieldInstanceLabelDescriptionTest::migrateDumpAlter()
  6. 11.x core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php \Drupal\Tests\field\Kernel\Migrate\d7\MigrateFieldInstanceLabelDescriptionTest::migrateDumpAlter()

Overrides MigrateDumpAlterInterface::migrateDumpAlter

File

core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php, line 48

Class

MigrateFieldInstanceLabelDescriptionTest
Tests migration of field label and description translations.

Namespace

Drupal\Tests\field\Kernel\Migrate\d6

Code

public static function migrateDumpAlter(KernelTestBase $test) {
    $db = Database::getConnection('default', 'migrate');
    // Alter the database to test the migration is successful when a translated
    // field is deleted but the translation data for that field remains in both
    // the i18n_strings and locales_target tables.
    $db->delete('content_node_field_instance')
        ->condition('field_name', 'field_test')
        ->condition('type_name', 'story')
        ->execute();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.