1
0
mirror of synced 2025-02-03 05:49:25 +03:00
doctrine2/tests/Doctrine/Tests/Mocks/DriverConnectionMock.php

103 lines
1.5 KiB
PHP
Raw Normal View History

2008-09-12 17:25:38 +00:00
<?php
namespace Doctrine\Tests\Mocks;
2009-01-04 16:15:32 +00:00
/**
* Mock class for DriverConnection.
*/
class DriverConnectionMock implements \Doctrine\DBAL\Driver\Connection
2008-09-12 17:25:38 +00:00
{
/**
* @var \Doctrine\DBAL\Driver\Statement
*/
private $statementMock;
/**
* @return \Doctrine\DBAL\Driver\Statement
*/
public function getStatementMock()
{
return $this->statementMock;
}
/**
* @param \Doctrine\DBAL\Driver\Statement $statementMock
*/
public function setStatementMock($statementMock)
{
$this->statementMock = $statementMock;
}
/**
* {@inheritdoc}
*/
public function prepare($prepareString)
{
return $this->statementMock ?: new StatementMock();
}
/**
* {@inheritdoc}
*/
public function query()
{
return $this->statementMock ?: new StatementMock();
}
/**
* {@inheritdoc}
*/
public function quote($input, $type=\PDO::PARAM_STR)
{
}
/**
* {@inheritdoc}
*/
public function exec($statement)
{
}
/**
* {@inheritdoc}
*/
public function lastInsertId($name = null)
{
}
/**
* {@inheritdoc}
*/
public function beginTransaction()
{
}
/**
* {@inheritdoc}
*/
public function commit()
{
}
/**
* {@inheritdoc}
*/
public function rollBack()
{
}
/**
* {@inheritdoc}
*/
public function errorCode()
{
}
/**
* {@inheritdoc}
*/
public function errorInfo()
{
}
}