You are here

SqlsrvTestBase.php in Drupal driver for SQL Server and SQL Azure 4.2.x

Same filename and directory in other branches
  1. 4.1.x tests/src/Kernel/SqlsrvTestBase.php

File

tests/src/Kernel/SqlsrvTestBase.php
View source
<?php

namespace Drupal\Tests\sqlsrv\Kernel;

use Drupal\Core\Database\Database;
use Drupal\KernelTests\Core\Database\DatabaseTestBase;

/**
 * Test aliases within GROUP BY and ORDER BY.
 *
 * @group Database
 */
abstract class SqlsrvTestBase extends DatabaseTestBase {

  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'sqlsrv',
  ];

  /**
   * {@inheritdoc}
   *
   * Skip any kernel tests if not running on the correct database.
   */
  protected function setup() {
    parent::setup();
    if (Database::getConnection()
      ->databaseType() !== 'sqlsrv') {
      $this
        ->markTestSkipped("This test only runs for MS SQL Server");
    }
  }

}

Classes

Namesort descending Description
SqlsrvTestBase Test aliases within GROUP BY and ORDER BY.