l10n_server-2.x-dev/l10n_migrate/tests/fixtures/localize7_group.php
l10n_migrate/tests/fixtures/localize7_group.php
<?php // phpcs:ignoreFile /** * @file * A database agnostic dump for testing purposes. * * This file is based on one generated by the Drupal 10.1.5 db-tools.php * script. */ use Drupal\Core\Database\Database; use Drupal\Tests\l10n_migrate\Kernel\MigrateL10nServerErrorTest as MigrateL10nTestAlias; $connection = Database::getConnection(); // Ensure any tables with a serial column with a value of 0 are created as // expected. if ($connection->databaseType() === 'mysql') { $sql_mode = $connection->query("SELECT @@sql_mode;")->fetchField(); $connection->query("SET sql_mode = '$sql_mode,NO_AUTO_VALUE_ON_ZERO'"); } $connection->schema()->createTable('node', array( 'fields' => array( 'nid' => array( 'type' => 'serial', 'not null' => TRUE, 'size' => 'normal', 'unsigned' => TRUE, ), 'vid' => array( 'type' => 'int', 'not null' => FALSE, 'size' => 'normal', 'unsigned' => TRUE, ), 'type' => array( 'type' => 'varchar', 'not null' => TRUE, 'length' => '32', 'default' => '', ), 'language' => array( 'type' => 'varchar', 'not null' => TRUE, 'length' => '12', 'default' => '', ), 'title' => array( 'type' => 'varchar', 'not null' => TRUE, 'length' => '255', 'default' => '', ), 'uid' => array( 'type' => 'int', 'not null' => TRUE, 'size' => 'normal', 'default' => '0', ), 'status' => array( 'type' => 'int', 'not null' => TRUE, 'size' => 'normal', 'default' => '1', ), 'created' => array( 'type' => 'int', 'not null' => TRUE, 'size' => 'normal', 'default' => '0', ), 'changed' => array( 'type' => 'int', 'not null' => TRUE, 'size' => 'normal', 'default' => '0', ), 'comment' => array( 'type' => 'int', 'not null' => TRUE, 'size' => 'normal', 'default' => '0', ), 'promote' => array( 'type' => 'int', 'not null' => TRUE, 'size' => 'normal', 'default' => '0', ), 'sticky' => array( 'type' => 'int', 'not null' => TRUE, 'size' => 'normal', 'default' => '0', ), 'tnid' => array( 'type' => 'int', 'not null' => TRUE, 'size' => 'normal', 'default' => '0', 'unsigned' => TRUE, ), 'translate' => array( 'type' => 'int', 'not null' => TRUE, 'size' => 'normal', 'default' => '0', ), ), 'primary key' => array( 'nid', ), 'unique keys' => array( 'vid' => array( 'vid', ), ), 'indexes' => array( 'node_changed' => array( 'changed', ), 'node_created' => array( 'created', ), 'node_status_type' => array( 'status', 'type', 'nid', ), 'node_title_type' => array( 'title', array( 'type', '4', ), ), 'node_type' => array( array( 'type', '4', ), ), 'uid' => array( 'uid', ), 'tnid' => array( 'tnid', ), 'translate' => array( 'translate', ), 'node_frontpage' => array( 'promote', 'status', 'sticky', 'created', ), 'language' => array( 'language', ), ), 'mysql_character_set' => 'utf8mb4', )); $rows = MigrateL10nTestAlias::expectedDataTable(); foreach ($rows as $row) { $connection->insert('l10n_server_error') ->fields(array_keys(current($rows))) ->values($row) ->execute(); } // Reset the SQL mode. if ($connection->databaseType() === 'mysql') { $connection->query("SET sql_mode = '$sql_mode'"); }