Loading core/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php +18 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,24 @@ protected function assertCollation(): void { $this->assertSame('ascii_general_ci', $string_ascii_check, 'test_field_string_ascii should have a ascii_general_ci collation, but it has not.'); } /** * {@inheritdoc} */ public function testTableWithSpecificDataType(): void { $table_specification = [ 'description' => 'Schema table description.', 'fields' => [ 'timestamp' => [ 'mysql_type' => 'timestamp', 'not null' => FALSE, 'default' => NULL, ], ], ]; $this->schema->createTable('test_timestamp', $table_specification); $this->assertTrue($this->schema->tableExists('test_timestamp')); } /** * Tests that indexes on string fields are limited to 191 characters on MySQL. * Loading core/modules/mysql/tests/src/Kernel/mysql/SyntaxTest.php 0 → 100644 +13 −0 Original line number Diff line number Diff line <?php namespace Drupal\Tests\mysql\Kernel\mysql; use Drupal\KernelTests\Core\Database\DriverSpecificSyntaxTestBase; /** * Tests MySql syntax interpretation. * * @group Database */ class SyntaxTest extends DriverSpecificSyntaxTestBase { } core/modules/mysql/tests/src/Kernel/mysql/TransactionTest.php 0 → 100644 +13 −0 Original line number Diff line number Diff line <?php namespace Drupal\Tests\mysql\Kernel\mysql; use Drupal\KernelTests\Core\Database\DriverSpecificTransactionTestBase; /** * Tests transaction for the MySQL driver. * * @group Database */ class TransactionTest extends DriverSpecificTransactionTestBase { } core/modules/pgsql/tests/src/Kernel/pgsql/SchemaTest.php +18 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,24 @@ protected function checkSequenceRenaming(string $tableName): void { $this->assertTrue($sequenceExists, 'Sequence was renamed.'); } /** * {@inheritdoc} */ public function testTableWithSpecificDataType(): void { $table_specification = [ 'description' => 'Schema table description.', 'fields' => [ 'timestamp' => [ 'pgsql_type' => 'timestamp', 'not null' => FALSE, 'default' => NULL, ], ], ]; $this->schema->createTable('test_timestamp', $table_specification); $this->assertTrue($this->schema->tableExists('test_timestamp')); } /** * @covers \Drupal\pgsql\Driver\Database\pgsql\Schema::introspectIndexSchema */ Loading core/modules/pgsql/tests/src/Kernel/pgsql/SyntaxTest.php 0 → 100644 +13 −0 Original line number Diff line number Diff line <?php namespace Drupal\Tests\pgsql\Kernel\pgsql; use Drupal\KernelTests\Core\Database\DriverSpecificSyntaxTestBase; /** * Tests PostgreSQL syntax interpretation. * * @group Database */ class SyntaxTest extends DriverSpecificSyntaxTestBase { } Loading
core/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php +18 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,24 @@ protected function assertCollation(): void { $this->assertSame('ascii_general_ci', $string_ascii_check, 'test_field_string_ascii should have a ascii_general_ci collation, but it has not.'); } /** * {@inheritdoc} */ public function testTableWithSpecificDataType(): void { $table_specification = [ 'description' => 'Schema table description.', 'fields' => [ 'timestamp' => [ 'mysql_type' => 'timestamp', 'not null' => FALSE, 'default' => NULL, ], ], ]; $this->schema->createTable('test_timestamp', $table_specification); $this->assertTrue($this->schema->tableExists('test_timestamp')); } /** * Tests that indexes on string fields are limited to 191 characters on MySQL. * Loading
core/modules/mysql/tests/src/Kernel/mysql/SyntaxTest.php 0 → 100644 +13 −0 Original line number Diff line number Diff line <?php namespace Drupal\Tests\mysql\Kernel\mysql; use Drupal\KernelTests\Core\Database\DriverSpecificSyntaxTestBase; /** * Tests MySql syntax interpretation. * * @group Database */ class SyntaxTest extends DriverSpecificSyntaxTestBase { }
core/modules/mysql/tests/src/Kernel/mysql/TransactionTest.php 0 → 100644 +13 −0 Original line number Diff line number Diff line <?php namespace Drupal\Tests\mysql\Kernel\mysql; use Drupal\KernelTests\Core\Database\DriverSpecificTransactionTestBase; /** * Tests transaction for the MySQL driver. * * @group Database */ class TransactionTest extends DriverSpecificTransactionTestBase { }
core/modules/pgsql/tests/src/Kernel/pgsql/SchemaTest.php +18 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,24 @@ protected function checkSequenceRenaming(string $tableName): void { $this->assertTrue($sequenceExists, 'Sequence was renamed.'); } /** * {@inheritdoc} */ public function testTableWithSpecificDataType(): void { $table_specification = [ 'description' => 'Schema table description.', 'fields' => [ 'timestamp' => [ 'pgsql_type' => 'timestamp', 'not null' => FALSE, 'default' => NULL, ], ], ]; $this->schema->createTable('test_timestamp', $table_specification); $this->assertTrue($this->schema->tableExists('test_timestamp')); } /** * @covers \Drupal\pgsql\Driver\Database\pgsql\Schema::introspectIndexSchema */ Loading
core/modules/pgsql/tests/src/Kernel/pgsql/SyntaxTest.php 0 → 100644 +13 −0 Original line number Diff line number Diff line <?php namespace Drupal\Tests\pgsql\Kernel\pgsql; use Drupal\KernelTests\Core\Database\DriverSpecificSyntaxTestBase; /** * Tests PostgreSQL syntax interpretation. * * @group Database */ class SyntaxTest extends DriverSpecificSyntaxTestBase { }