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