function StubPDO::__construct
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Database/Stub/StubPDO.php \Drupal\Tests\Core\Database\Stub\StubPDO::__construct()
- 8.9.x core/tests/Drupal/Tests/Core/Database/Stub/StubPDO.php \Drupal\Tests\Core\Database\Stub\StubPDO::__construct()
- 10 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 29
Class
- StubPDO
- A stub of \PDO for testing purposes.
Namespace
Drupal\Tests\Core\Database\StubCode
public function __construct() {
// No-op.
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.