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/SqliteSchemaManagerTest.php 1 location

@@ 116-135 (lines=20) @@
113
        self::assertEquals('NOCASE', $columns['bar']->getPlatformOption('collation'));
114
    }
115
116
    public function testListTableWithBinary()
117
    {
118
        $tableName = 'test_binary_table';
119
120
        $table = new \Doctrine\DBAL\Schema\Table($tableName);
121
        $table->addColumn('id', 'integer');
122
        $table->addColumn('column_varbinary', 'binary', array());
123
        $table->addColumn('column_binary', 'binary', array('fixed' => true));
124
        $table->setPrimaryKey(array('id'));
125
126
        $this->_sm->createTable($table);
127
128
        $table = $this->_sm->listTableDetails($tableName);
129
130
        self::assertInstanceOf('Doctrine\DBAL\Types\BlobType', $table->getColumn('column_varbinary')->getType());
131
        self::assertFalse($table->getColumn('column_varbinary')->getFixed());
132
133
        self::assertInstanceOf('Doctrine\DBAL\Types\BlobType', $table->getColumn('column_binary')->getType());
134
        self::assertFalse($table->getColumn('column_binary')->getFixed());
135
    }
136
137
    public function testNonDefaultPKOrder()
138
    {

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

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

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

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