Loading core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -200,6 +200,9 @@ protected function runEnsureTablesTest($schema) { $database->expects($this->any()) ->method('schema') ->willReturn($schema); $database->expects($this->any()) ->method('tablePrefix') ->willReturn(''); $migration = $this->getMigration(); $plugin = $this->createMock('Drupal\migrate\Plugin\MigrateSourceInterface'); $plugin->expects($this->any()) Loading core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -72,13 +72,13 @@ public function testMakeUniqueEntityField($count, $postfix = '', $start = NULL, if ($postfix) { $configuration['postfix'] = $postfix; } $configuration['start'] = isset($start) ? $start : NULL; $configuration['length'] = isset($length) ? $length : NULL; $configuration['start'] = $start; $configuration['length'] = $length; $plugin = new MakeUniqueEntityField($configuration, 'make_unique', [], $this->getMigration(), $this->entityTypeManager); $this->entityQueryExpects($count); $value = $this->randomMachineName(32); $actual = $plugin->transform($value, $this->migrateExecutable, $this->row, 'testproperty'); $expected = mb_substr($value, $start, $length); $expected = mb_substr($value, $start ?? 0, $length); $expected .= $count ? $postfix . $count : ''; $this->assertSame($expected, $actual); } Loading Loading
core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -200,6 +200,9 @@ protected function runEnsureTablesTest($schema) { $database->expects($this->any()) ->method('schema') ->willReturn($schema); $database->expects($this->any()) ->method('tablePrefix') ->willReturn(''); $migration = $this->getMigration(); $plugin = $this->createMock('Drupal\migrate\Plugin\MigrateSourceInterface'); $plugin->expects($this->any()) Loading
core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -72,13 +72,13 @@ public function testMakeUniqueEntityField($count, $postfix = '', $start = NULL, if ($postfix) { $configuration['postfix'] = $postfix; } $configuration['start'] = isset($start) ? $start : NULL; $configuration['length'] = isset($length) ? $length : NULL; $configuration['start'] = $start; $configuration['length'] = $length; $plugin = new MakeUniqueEntityField($configuration, 'make_unique', [], $this->getMigration(), $this->entityTypeManager); $this->entityQueryExpects($count); $value = $this->randomMachineName(32); $actual = $plugin->transform($value, $this->migrateExecutable, $this->row, 'testproperty'); $expected = mb_substr($value, $start, $length); $expected = mb_substr($value, $start ?? 0, $length); $expected .= $count ? $postfix . $count : ''; $this->assertSame($expected, $actual); } Loading