Completed
Pull Request — master (#3458)
by Yannick
61:57
created

MySqlPlatformTest::testPreserveIndexOnAlterTable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Doctrine\Tests\DBAL\Platforms;
4
5
use Doctrine\DBAL\Platforms\MySqlPlatform;
6
use Doctrine\DBAL\Schema\Index;
7
use Doctrine\DBAL\Schema\TableDiff;
8
use Doctrine\DBAL\TransactionIsolationLevel;
9
10
class MySqlPlatformTest extends AbstractMySQLPlatformTestCase
11
{
12
    public function createPlatform()
13
    {
14
        return new MySqlPlatform();
15
    }
16
17
    public function testHasCorrectDefaultTransactionIsolationLevel()
18
    {
19
        self::assertEquals(
20
            TransactionIsolationLevel::REPEATABLE_READ,
21
            $this->platform->getDefaultTransactionIsolationLevel()
22
        );
23
    }
24
25
    public function testPreserveIndexOnAlterTable()
26
    {
27
        $index = new Index('index_name', ['column']);
28
        $diff = new TableDiff('table_name', [], [], [], [], [$index]);
29
        $this->assertEquals([], $this->createPlatform()->getAlterTableSQL($diff));
30
    }
31
}
32