diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php index d771ab1..93e8476 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php @@ -111,6 +111,10 @@ public function testEnsureTablesNotExist() { ); $table_schema['indexes']['sourcekey'] = array('sourceid1'); + $schema->expects($this->at(2)) + ->method('tableExists') + ->with('migrate_message_sql_idmap_test') + ->will($this->returnValue(FALSE)); $schema->expects($this->at(3)) ->method('createTable') ->with('migrate_message_sql_idmap_test', $table_schema); diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateDrupal6Test.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateDrupal6Test.php index 23b5570..8a93240 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateDrupal6Test.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateDrupal6Test.php @@ -189,12 +189,14 @@ protected function setUp() { // Install one of D8's test themes. \Drupal::service('theme_handler')->install(array('test_theme')); - // Create a new user. This is needed by - // \Drupal\migrate_drupal\Tests\d6\MigrateNodeTestBase + // Create a new user which needs to have UID 1, because that is expected by + // the assertions from + // \Drupal\migrate_drupal\Tests\d6\MigrateNodeRevisionTest. User::create([ + 'uid' => 1, 'name' => $this->randomMachineName(), 'status' => 1, - ])->save(); + ])->enforceIsNew(TRUE)->save(); } /** diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTestBase.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTestBase.php index ff36ceb..4ff3ae3 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTestBase.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTestBase.php @@ -29,11 +29,15 @@ protected function setUp() { $this->installSchema('node', ['node_access']); $this->installSchema('system', ['sequences']); - // Create a new user. + // Create a new user which needs to have UID 1, because that is expected by + // the assertions from + // \Drupal\migrate_drupal\Tests\d6\MigrateNodeRevisionTest. User::create([ + 'uid' => 1, 'name' => $this->randomMachineName(), 'status' => 1, - ])->save(); + ])->enforceIsNew(TRUE)->save(); + $node_type = entity_create('node_type', array('type' => 'test_planet')); $node_type->save();