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

79 lines
1.6 KiB
PHP
Raw Normal View History

<?php
namespace Doctrine\Tests\Mocks;
2009-01-04 19:15:32 +03:00
class DatabasePlatformMock extends \Doctrine\DBAL\Platforms\AbstractPlatform
{
private $_sequenceNextValSql = "";
private $_prefersIdentityColumns = true;
private $_prefersSequences = false;
2008-09-07 17:48:40 +04:00
/**
* @override
*/
public function getNativeDeclaration(array $field) {}
2008-09-07 17:48:40 +04:00
/**
* @override
*/
public function getPortableDeclaration(array $field) {}
2008-09-07 17:48:40 +04:00
/**
* @override
*/
public function prefersIdentityColumns()
{
2008-09-07 17:48:40 +04:00
return $this->_prefersIdentityColumns;
}
/**
* @override
*/
public function prefersSequences()
{
return $this->_prefersSequences;
}
/** @override */
public function getSequenceNextValSql($sequenceName)
{
return $this->_sequenceNextValSql;
}
/** @override */
public function getIntegerTypeDeclarationSql(array $field) {}
/** @override */
public function getBigIntTypeDeclarationSql(array $field) {}
/** @override */
public function getSmallIntTypeDeclarationSql(array $field) {}
/** @override */
protected function _getCommonIntegerTypeDeclarationSql(array $columnDef) {}
/** @override */
public function getVarcharTypeDeclarationSql(array $field) {}
2008-09-07 17:48:40 +04:00
/* MOCK API */
2008-09-07 17:48:40 +04:00
public function setPrefersIdentityColumns($bool)
{
$this->_prefersIdentityColumns = $bool;
}
public function setPrefersSequences($bool)
{
$this->_prefersSequences = $bool;
2008-09-07 17:48:40 +04:00
}
public function setSequenceNextValSql($sql)
{
$this->_sequenceNextValSql = $sql;
}
public function getName()
{
return 'mock';
}
}