You are here

class TestSqlBase in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/migrate/src/Tests/SqlBaseTest.php \Drupal\migrate\Plugin\migrate\source\TestSqlBase
  2. 8 core/modules/migrate/tests/src/Unit/SqlBaseTest.php \Drupal\Tests\migrate\Unit\TestSqlBase
Same name and namespace in other branches
  1. 8.0 core/modules/migrate/src/Tests/SqlBaseTest.php \Drupal\migrate\Plugin\migrate\source\TestSqlBase

A dummy source to help with testing SqlBase.

@package Drupal\migrate\Plugin\migrate\source

Hierarchy

  • class \Drupal\migrate\Plugin\migrate\source\TestSqlBase extends \Drupal\migrate\Tests\SqlBase

Expanded class hierarchy of TestSqlBase

1 file declares its use of TestSqlBase
SqlBaseTest.php in core/modules/migrate/src/Tests/SqlBaseTest.php
Contains \Drupal\migrate\Tests\SqlBaseTest.

File

core/modules/migrate/src/Tests/SqlBaseTest.php, line 96
Contains \Drupal\migrate\Tests\SqlBaseTest.

Namespace

Drupal\migrate\Tests
View source
class TestSqlBase extends SqlBase {

  /**
   * Override the constructor so we can create one easily.
   */
  public function __construct() {
    $this->state = \Drupal::state();
  }

  /**
   * Get the database without caching it.
   */
  public function getDatabase() {
    $this->database = NULL;
    return parent::getDatabase();
  }

  /**
   * Allow us to set the configuration from a test.
   *
   * @param array $config
   *   The config array.
   */
  public function setConfiguration($config) {
    $this->configuration = $config;
  }

  /**
   * {@inheritdoc}
   */
  public function getIds() {
  }

  /**
   * {@inheritdoc}
   */
  public function fields() {
  }

  /**
   * {@inheritdoc}
   */
  public function query() {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TestSqlBase::fields public function
TestSqlBase::getDatabase public function Get the database without caching it.
TestSqlBase::getIds public function
TestSqlBase::query public function
TestSqlBase::setConfiguration public function Allow us to set the configuration from a test.
TestSqlBase::__construct public function Override the constructor so we can create one easily.