Verified Commit 92c09c8f authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3316923 by mondrake, daffie, catch: Sort out more driver specific database kernel tests

parent 104a2559
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -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.
   *
+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 {
}
+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 {
}
+18 −0
Original line number Diff line number Diff line
@@ -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
   */
+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