function StubConnection::__construct

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php \Drupal\Tests\Core\Database\Stub\StubConnection::__construct()
  2. 11.x core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php \Drupal\Tests\Core\Database\Stub\StubConnection::__construct()

Constructs a Connection object.

Parameters

\PDO $connection: An object of the PDO class representing a database connection.

array $connection_options: An array of options for the connection.

string[]|null $identifier_quotes: The identifier quote characters. Defaults to an empty strings.

File

core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php, line 50

Class

StubConnection
A stub of the abstract Connection class for testing purposes.

Namespace

Drupal\Tests\Core\Database\Stub

Code

public function __construct(\PDO $connection, array $connection_options, $identifier_quotes = [
    '',
    '',
]) {
    $this->identifierQuotes = $identifier_quotes;
    parent::__construct($connection, $connection_options);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.