MockPlatform.php 1.51 KB
Newer Older
1 2 3 4
<?php

namespace Doctrine\Tests\DBAL\Mocks;

jeroendedauw's avatar
jeroendedauw committed
5
use Doctrine\DBAL\DBALException;
Endre Fejes's avatar
Endre Fejes committed
6
use Doctrine\DBAL\Platforms\AbstractPlatform;
7

Endre Fejes's avatar
Endre Fejes committed
8
class MockPlatform extends AbstractPlatform
9
{
10 11 12 13 14 15 16 17
    /**
     * Gets the SQL Snippet used to declare a BLOB column type.
     */
    public function getBlobTypeDeclarationSQL(array $field)
    {
        throw DBALException::notSupported(__METHOD__);
    }

18 19 20 21 22
    public function getBooleanTypeDeclarationSQL(array $columnDef) {}
    public function getIntegerTypeDeclarationSQL(array $columnDef) {}
    public function getBigIntTypeDeclarationSQL(array $columnDef) {}
    public function getSmallIntTypeDeclarationSQL(array $columnDef) {}
    public function _getCommonIntegerTypeDeclarationSQL(array $columnDef) {}
23

24
    public function getVarcharTypeDeclarationSQL(array $field)
25 26 27
    {
        return "DUMMYVARCHAR()";
    }
28

29
    /** @override */
30
    public function getClobTypeDeclarationSQL(array $field)
31 32 33
    {
        return 'DUMMYCLOB';
    }
34

35 36 37 38 39 40 41 42
    /**
     * {@inheritdoc}
     */
    public function getJsonTypeDeclarationSQL(array $field)
    {
        return 'DUMMYJSON';
    }

Steve Müller's avatar
Steve Müller committed
43 44 45 46 47 48 49 50
    /**
     * {@inheritdoc}
     */
    public function getBinaryTypeDeclarationSQL(array $field)
    {
        return 'DUMMYBINARY';
    }

51 52 53 54 55
    public function getVarcharDefaultLength()
    {
        return 255;
    }

56 57 58 59
    public function getName()
    {
        return 'mock';
    }
60 61
    protected function initializeDoctrineTypeMappings() {
    }
62 63 64 65
    protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed)
    {

    }
66
}