@@ 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 | { |
@@ 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 |
@@ 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 | { |
@@ 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 | { |
@@ 286-305 (lines=20) @@ | ||
283 | $this->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 | $this->assertInstanceOf('Doctrine\DBAL\Types\BlobType', $table->getColumn('column_varbinary')->getType()); |
|
301 | $this->assertFalse($table->getColumn('column_varbinary')->getFixed()); |
|
302 | ||
303 | $this->assertInstanceOf('Doctrine\DBAL\Types\BlobType', $table->getColumn('column_binary')->getType()); |
|
304 | $this->assertFalse($table->getColumn('column_binary')->getFixed()); |
|
305 | } |
|
306 | ||
307 | public function testListQuotedTable() |
|
308 | { |