You are here

public function StubPDO::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Database/Stub/StubPDO.php \Drupal\Tests\Core\Database\Stub\StubPDO::__construct()

Construction method.

We override this construction method with a no-op in order to mock \PDO under unit tests.

See also

http://stackoverflow.com/questions/3138946/mocking-the-pdo-object-using-...

File

core/tests/Drupal/Tests/Core/Database/Stub/StubPDO.php, line 27

Class

StubPDO
A stub of \PDO for testing purposes.

Namespace

Drupal\Tests\Core\Database\Stub

Code

public function __construct() {

  // No-op.
}