Code Duplication    Length = 20-20 lines in 5 locations

tests/Doctrine/Tests/DBAL/Functional/Schema/DrizzleSchemaManagerTest.php 1 location

@@ 9-28 (lines=20) @@
6
7
class DrizzleSchemaManagerTest extends SchemaManagerFunctionalTestCase
8
{
9
    public function testListTableWithBinary()
10
    {
11
        $tableName = 'test_binary_table';
12
13
        $table = new Table($tableName);
14
        $table->addColumn('id', 'integer');
15
        $table->addColumn('column_varbinary', 'binary', array());
16
        $table->addColumn('column_binary', 'binary', array('fixed' => true));
17
        $table->setPrimaryKey(array('id'));
18
19
        $this->_sm->createTable($table);
20
21
        $table = $this->_sm->listTableDetails($tableName);
22
23
        self::assertInstanceOf('Doctrine\DBAL\Types\BinaryType', $table->getColumn('column_varbinary')->getType());
24
        self::assertFalse($table->getColumn('column_varbinary')->getFixed());
25
26
        self::assertInstanceOf('Doctrine\DBAL\Types\BinaryType', $table->getColumn('column_binary')->getType());
27
        self::assertFalse($table->getColumn('column_binary')->getFixed());
28
    }
29
30
    public function testColumnCollation()
31
    {

tests/Doctrine/Tests/DBAL/Functional/Schema/OracleSchemaManagerTest.php 1 location

@@ 41-60 (lines=20) @@
38
        self::assertHasTable($tables, 'list_tables_test_new_name');
39
    }
40
41
    public function testListTableWithBinary()
42
    {
43
        $tableName = 'test_binary_table';
44
45
        $table = new \Doctrine\DBAL\Schema\Table($tableName);
46
        $table->addColumn('id', 'integer');
47
        $table->addColumn('column_varbinary', 'binary', array());
48
        $table->addColumn('column_binary', 'binary', array('fixed' => true));
49
        $table->setPrimaryKey(array('id'));
50
51
        $this->_sm->createTable($table);
52
53
        $table = $this->_sm->listTableDetails($tableName);
54
55
        self::assertInstanceOf('Doctrine\DBAL\Types\BinaryType', $table->getColumn('column_varbinary')->getType());
56
        self::assertFalse($table->getColumn('column_varbinary')->getFixed());
57
58
        self::assertInstanceOf('Doctrine\DBAL\Types\BinaryType', $table->getColumn('column_binary')->getType());
59
        self::assertFalse($table->getColumn('column_binary')->getFixed());
60
    }
61
62
    /**
63
     * @group DBAL-472

tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php 1 location

@@ 288-307 (lines=20) @@
285
        self::assertFalse($diff);
286
    }
287
288
    public function testListTableWithBinary()
289
    {
290
        $tableName = 'test_binary_table';
291
292
        $table = new \Doctrine\DBAL\Schema\Table($tableName);
293
        $table->addColumn('id', 'integer');
294
        $table->addColumn('column_varbinary', 'binary', array());
295
        $table->addColumn('column_binary', 'binary', array('fixed' => true));
296
        $table->setPrimaryKey(array('id'));
297
298
        $this->_sm->createTable($table);
299
300
        $table = $this->_sm->listTableDetails($tableName);
301
302
        self::assertInstanceOf('Doctrine\DBAL\Types\BlobType', $table->getColumn('column_varbinary')->getType());
303
        self::assertFalse($table->getColumn('column_varbinary')->getFixed());
304
305
        self::assertInstanceOf('Doctrine\DBAL\Types\BlobType', $table->getColumn('column_binary')->getType());
306
        self::assertFalse($table->getColumn('column_binary')->getFixed());
307
    }
308
309
    public function testListQuotedTable()
310
    {

tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php 1 location

@@ 992-1011 (lines=20) @@
989
        self::assertNull($columns['column7']->getDefault());
990
    }
991
992
    public function testListTableWithBinary()
993
    {
994
        $tableName = 'test_binary_table';
995
996
        $table = new Table($tableName);
997
        $table->addColumn('id', 'integer');
998
        $table->addColumn('column_varbinary', 'binary', array());
999
        $table->addColumn('column_binary', 'binary', array('fixed' => true));
1000
        $table->setPrimaryKey(array('id'));
1001
1002
        $this->_sm->createTable($table);
1003
1004
        $table = $this->_sm->listTableDetails($tableName);
1005
1006
        self::assertInstanceOf('Doctrine\DBAL\Types\BinaryType', $table->getColumn('column_varbinary')->getType());
1007
        self::assertFalse($table->getColumn('column_varbinary')->getFixed());
1008
1009
        self::assertInstanceOf('Doctrine\DBAL\Types\BinaryType', $table->getColumn('column_binary')->getType());
1010
        self::assertTrue($table->getColumn('column_binary')->getFixed());
1011
    }
1012
1013
    public function testListTableDetailsWithFullQualifiedTableName()
1014
    {

tests/Doctrine/Tests/DBAL/Functional/Schema/SqliteSchemaManagerTest.php 1 location

@@ 131-150 (lines=20) @@
128
        self::assertEquals('NOCASE', $columns['bar']->getPlatformOption('collation'));
129
    }
130
131
    public function testListTableWithBinary()
132
    {
133
        $tableName = 'test_binary_table';
134
135
        $table = new \Doctrine\DBAL\Schema\Table($tableName);
136
        $table->addColumn('id', 'integer');
137
        $table->addColumn('column_varbinary', 'binary', array());
138
        $table->addColumn('column_binary', 'binary', array('fixed' => true));
139
        $table->setPrimaryKey(array('id'));
140
141
        $this->_sm->createTable($table);
142
143
        $table = $this->_sm->listTableDetails($tableName);
144
145
        self::assertInstanceOf('Doctrine\DBAL\Types\BlobType', $table->getColumn('column_varbinary')->getType());
146
        self::assertFalse($table->getColumn('column_varbinary')->getFixed());
147
148
        self::assertInstanceOf('Doctrine\DBAL\Types\BlobType', $table->getColumn('column_binary')->getType());
149
        self::assertFalse($table->getColumn('column_binary')->getFixed());
150
    }
151
152
    public function testNonDefaultPKOrder()
153
    {