Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / migrate_drupal / tests / src / Kernel / IdMapTableNoDummyTest.php
1 <?php
2
3 namespace Drupal\Tests\migrate_drupal\Kernel;
4
5 use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
6
7 /**
8  * Test that no dummy migrate_map tables are created.
9  *
10  * @group migrate_drupal
11  */
12 class IdMapTableNoDummyTest extends MigrateDrupal6TestBase {
13
14   /**
15    * The migration plugin manager.
16    *
17    * @var \Drupal\migrate\Plugin\MigrationPluginManagerInterface
18    */
19   protected $pluginManager;
20
21   /**
22    * {@inheritdoc}
23    */
24   public function setUp() {
25     parent::setUp();
26     $this->pluginManager = $this->container->get('plugin.manager.migration');
27     $this->pluginManager->createInstance('d6_user');
28   }
29
30   /**
31    * Test that dummy map tables do not exist.
32    */
33   public function testNoDummyTables() {
34     $database = \Drupal::database();
35     $tables = $database->schema()->findTables('%migrate_map%');
36     $dummy_tables = preg_grep("/.*migrate_map_([0-9a-fA-F]){13}/", $tables);
37     $this->assertCount(0, $dummy_tables);
38   }
39
40 }