| @@ 267-281 (lines=15) @@ | ||
| 264 | /** | |
| 265 | * @group DDC-2843 | |
| 266 | */ | |
| 267 | public function testBooleanDefault() | |
| 268 |     { | |
| 269 |         $table = new \Doctrine\DBAL\Schema\Table('ddc2843_bools'); | |
| 270 |         $table->addColumn('id', 'integer'); | |
| 271 |         $table->addColumn('checked', 'boolean', array('default' => false)); | |
| 272 | ||
| 273 | $this->_sm->createTable($table); | |
| 274 | ||
| 275 | $databaseTable = $this->_sm->listTableDetails($table->getName()); | |
| 276 | ||
| 277 | $c = new \Doctrine\DBAL\Schema\Comparator(); | |
| 278 | $diff = $c->diffTable($table, $databaseTable); | |
| 279 | ||
| 280 | $this->assertFalse($diff); | |
| 281 | } | |
| 282 | ||
| 283 | public function testListTableWithBinary() | |
| 284 |     { | |
| @@ 22-36 (lines=15) @@ | ||
| 19 | } | |
| 20 | } | |
| 21 | ||
| 22 | public function testSearchPathSchemaChanges() | |
| 23 |     { | |
| 24 |         $table = new Table("dbal510tbl"); | |
| 25 |         $table->addColumn('id', 'integer'); | |
| 26 |         $table->setPrimaryKey(array('id')); | |
| 27 | ||
| 28 | $this->_conn->getSchemaManager()->createTable($table); | |
| 29 | ||
| 30 |         $onlineTable = $this->_conn->getSchemaManager()->listTableDetails('dbal510tbl'); | |
| 31 | ||
| 32 | $comparator = new Comparator(); | |
| 33 | $diff = $comparator->diffTable($onlineTable, $table); | |
| 34 | ||
| 35 | $this->assertFalse($diff); | |
| 36 | } | |
| 37 | } | |
| 38 | ||
| @@ 183-196 (lines=14) @@ | ||
| 180 |         $this->assertFalse($onlineTable->getColumn('def_blob_null')->getNotnull()); | |
| 181 | } | |
| 182 | ||
| 183 | public function testEscapedDefaultValueMustBePreserved() | |
| 184 |     { | |
| 185 | $value = "a\\0a\\'a\"a\na\ra\ta\\Za\\\\a"; | |
| 186 | ||
| 187 |         $table = new Table('string_escaped_default_value'); | |
| 188 |         $table->addColumn('def_string', 'string', array('default' => $value)); | |
| 189 | $this->_sm->dropAndCreateTable($table); | |
| 190 | ||
| 191 |         $onlineTable = $this->_sm->listTableDetails('string_escaped_default_value'); | |
| 192 |         $this->assertSame($value, $onlineTable->getColumn('def_string')->getDefault()); | |
| 193 | ||
| 194 | $comparator = new Comparator(); | |
| 195 | $this->assertFalse($comparator->diffTable($table, $onlineTable)); | |
| 196 | } | |
| 197 | ||
| 198 | public function testColumnCollation() | |
| 199 |     { | |