1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/tests/Doctrine/Tests/Mocks/DatabasePlatformMock.php

153 lines
2.5 KiB
PHP
Raw Normal View History

<?php
namespace Doctrine\Tests\Mocks;
2009-01-04 19:15:32 +03:00
/**
* Mock class for DatabasePlatform.
*/
class DatabasePlatformMock extends \Doctrine\DBAL\Platforms\AbstractPlatform
{
/**
* @var string
*/
private $_sequenceNextValSql = "";
/**
* @var bool
*/
private $_prefersIdentityColumns = true;
/**
* @var bool
*/
private $_prefersSequences = false;
2008-09-07 17:48:40 +04:00
/**
* {@inheritdoc}
2008-09-07 17:48:40 +04:00
*/
public function prefersIdentityColumns()
{
2008-09-07 17:48:40 +04:00
return $this->_prefersIdentityColumns;
}
/**
* {@inheritdoc}
*/
public function prefersSequences()
{
return $this->_prefersSequences;
}
/**
* {@inheritdoc}
*/
public function getSequenceNextValSQL($sequenceName)
{
return $this->_sequenceNextValSql;
}
/**
* {@inheritdoc}
*/
public function getBooleanTypeDeclarationSQL(array $field)
{
}
/**
* {@inheritdoc}
*/
public function getIntegerTypeDeclarationSQL(array $field)
{
}
/**
* {@inheritdoc}
*/
public function getBigIntTypeDeclarationSQL(array $field)
{
}
/**
* {@inheritdoc}
*/
public function getSmallIntTypeDeclarationSQL(array $field)
{
}
/**
* {@inheritdoc}
*/
protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef)
{
}
/**
* {@inheritdoc}
*/
public function getVarcharTypeDeclarationSQL(array $field)
{
}
2011-11-12 15:56:44 +04:00
/**
* {@inheritdoc}
*/
public function getClobTypeDeclarationSQL(array $field)
{
}
2008-09-07 17:48:40 +04:00
/* MOCK API */
/**
* @param bool $bool
*
* @return void
*/
2008-09-07 17:48:40 +04:00
public function setPrefersIdentityColumns($bool)
{
$this->_prefersIdentityColumns = $bool;
}
/**
* @param bool $bool
*
* @return void
*/
public function setPrefersSequences($bool)
{
$this->_prefersSequences = $bool;
2008-09-07 17:48:40 +04:00
}
/**
* @param string $sql
*
* @return void
*/
public function setSequenceNextValSql($sql)
{
$this->_sequenceNextValSql = $sql;
}
/**
* {@inheritdoc}
*/
public function getName()
{
return 'mock';
}
/**
* {@inheritdoc}
*/
protected function initializeDoctrineTypeMappings()
{
2011-11-12 15:56:44 +04:00
}
2011-11-12 15:56:44 +04:00
/**
* {@inheritdoc}
2011-11-12 15:56:44 +04:00
*/
public function getBlobTypeDeclarationSQL(array $field)
{
throw DBALException::notSupported(__METHOD__);
}
}