diff --git a/tests/fixtures/drupal5.php b/tests/fixtures/drupal5.php index c6ec15f267b8b1453b2f967e3da308a665c8cb86..528bc979286cdac8a3a295e040f1a9969d41c81c 100644 --- a/tests/fixtures/drupal5.php +++ b/tests/fixtures/drupal5.php @@ -4,12 +4,18 @@ * @file * A database agnostic dump for testing purposes. * - * This file was generated by the Drupal 9.2.7 db-tools.php script. + * This file was generated by the Drupal 9.3.12 db-tools.php script. */ use Drupal\Core\Database\Database; $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('access', array( 'fields' => array( @@ -2084,15 +2090,21 @@ $connection->insert('filter_formats') ->values(array( 'format' => '3', 'name' => 'Full HTML', - 'roles' => '', + 'roles' => ',4,', 'cache' => '1', )) ->values(array( 'format' => '4', 'name' => 'PHP code', - 'roles' => ',,', + 'roles' => ',6,3,', 'cache' => '0', )) +->values(array( + 'format' => '5', + 'name' => 'Empty input format', + 'roles' => ',,', + 'cache' => '1', +)) ->execute(); $connection->schema()->createTable('filters', array( 'fields' => array( @@ -2157,14 +2169,14 @@ $connection->insert('filters') ->values(array( 'format' => '3', 'module' => 'filter', - 'delta' => '3', - 'weight' => '0', + 'delta' => '2', + 'weight' => '1', )) ->values(array( 'format' => '3', 'module' => 'filter', - 'delta' => '2', - 'weight' => '1', + 'delta' => '3', + 'weight' => '0', )) ->values(array( 'format' => '4', @@ -7104,6 +7116,10 @@ $connection->insert('variable') 'name', 'value', )) +->values(array( + 'name' => 'admin_theme', + 'value' => 's:1:"0";', +)) ->values(array( 'name' => 'clean_url', 'value' => 's:1:"1";', @@ -7481,3 +7497,8 @@ $connection->schema()->createTable('watchdog', array( ), 'mysql_character_set' => 'utf8', )); + +// Reset the SQL mode. +if ($connection->databaseType() === 'mysql') { + $connection->query("SET sql_mode = '$sql_mode'"); +}