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
        $this->assertInstanceOf('Doctrine\DBAL\Types\BinaryType', $table->getColumn('column_varbinary')->getType());
24
        $this->assertFalse($table->getColumn('column_varbinary')->getFixed());
25
26
        $this->assertInstanceOf('Doctrine\DBAL\Types\BinaryType', $table->getColumn('column_binary')->getType());
27
        $this->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
        $this->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
        $this->assertInstanceOf('Doctrine\DBAL\Types\BinaryType', $table->getColumn('column_varbinary')->getType());
56
        $this->assertFalse($table->getColumn('column_varbinary')->getFixed());
57
58
        $this->assertInstanceOf('Doctrine\DBAL\Types\BinaryType', $table->getColumn('column_binary')->getType());
59
        $this->assertFalse($table->getColumn('column_binary')->getFixed());
60
    }
61
62
    /**
63
     * @group DBAL-472

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

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

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

@@ 972-991 (lines=20) @@
969
        $this->assertNull($columns['column7']->getDefault());
970
    }
971
972
    public function testListTableWithBinary()
973
    {
974
        $tableName = 'test_binary_table';
975
976
        $table = new Table($tableName);
977
        $table->addColumn('id', 'integer');
978
        $table->addColumn('column_varbinary', 'binary', array());
979
        $table->addColumn('column_binary', 'binary', array('fixed' => true));
980
        $table->setPrimaryKey(array('id'));
981
982
        $this->_sm->createTable($table);
983
984
        $table = $this->_sm->listTableDetails($tableName);
985
986
        $this->assertInstanceOf('Doctrine\DBAL\Types\BinaryType', $table->getColumn('column_varbinary')->getType());
987
        $this->assertFalse($table->getColumn('column_varbinary')->getFixed());
988
989
        $this->assertInstanceOf('Doctrine\DBAL\Types\BinaryType', $table->getColumn('column_binary')->getType());
990
        $this->assertTrue($table->getColumn('column_binary')->getFixed());
991
    }
992
993
    public function testListTableDetailsWithFullQualifiedTableName()
994
    {

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

@@ 116-135 (lines=20) @@
113
        $this->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
        $this->assertInstanceOf('Doctrine\DBAL\Types\BlobType', $table->getColumn('column_varbinary')->getType());
131
        $this->assertFalse($table->getColumn('column_varbinary')->getFixed());
132
133
        $this->assertInstanceOf('Doctrine\DBAL\Types\BlobType', $table->getColumn('column_binary')->getType());
134
        $this->assertFalse($table->getColumn('column_binary')->getFixed());
135
    }
136
137
    public function testNonDefaultPKOrder()
138
    {