MockPlatform.php 1.49 KB
Newer Older
1 2 3 4 5 6 7 8
<?php

namespace Doctrine\Tests\DBAL\Mocks;

use Doctrine\DBAL\Platforms;

class MockPlatform extends \Doctrine\DBAL\Platforms\AbstractPlatform
{
9 10 11 12 13 14 15 16
    /**
     * Gets the SQL Snippet used to declare a BLOB column type.
     */
    public function getBlobTypeDeclarationSQL(array $field)
    {
        throw DBALException::notSupported(__METHOD__);
    }

17 18 19 20 21
    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) {}
22

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

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

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

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

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

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

    }
65
}