IdMapTableNoDummyTest.php in Drupal 9
File
core/modules/migrate_drupal/tests/src/Kernel/IdMapTableNoDummyTest.php
View source
<?php
namespace Drupal\Tests\migrate_drupal\Kernel;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
class IdMapTableNoDummyTest extends MigrateDrupal6TestBase {
protected $pluginManager;
public function setUp() : void {
parent::setUp();
$this->pluginManager = $this->container
->get('plugin.manager.migration');
$this->pluginManager
->createInstance('d6_user');
}
public function testNoDummyTables() {
$database = \Drupal::database();
$tables = $database
->schema()
->findTables('%migrate_map%');
$dummy_tables = preg_grep("/.*migrate_map_([0-9a-fA-F]){13}/", $tables);
$this
->assertCount(0, $dummy_tables);
}
}