class MockPdo in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php \Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\MockPdo
Hierarchy
- class \Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\MockPdo extends \Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\PDO
Expanded class hierarchy of MockPdo
File
- vendor/
symfony/ http-foundation/ Tests/ Session/ Storage/ Handler/ PdoSessionHandlerTest.php, line 324
Namespace
Symfony\Component\HttpFoundation\Tests\Session\Storage\HandlerView source
class MockPdo extends \PDO {
public $prepareResult;
private $driverName;
private $errorMode;
public function __construct($driverName = null, $errorMode = null) {
$this->driverName = $driverName;
$this->errorMode = null !== $errorMode ?: \PDO::ERRMODE_EXCEPTION;
}
public function getAttribute($attribute) {
if (\PDO::ATTR_ERRMODE === $attribute) {
return $this->errorMode;
}
if (\PDO::ATTR_DRIVER_NAME === $attribute) {
return $this->driverName;
}
return parent::getAttribute($attribute);
}
public function prepare($statement, $driverOptions = array()) {
return is_callable($this->prepareResult) ? call_user_func($this->prepareResult, $statement, $driverOptions) : $this->prepareResult;
}
public function beginTransaction() {
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MockPdo:: |
private | property | ||
MockPdo:: |
private | property | ||
MockPdo:: |
public | property | ||
MockPdo:: |
public | function | ||
MockPdo:: |
public | function | ||
MockPdo:: |
public | function | ||
MockPdo:: |
public | function |