|
@@ 198-206 (lines=9) @@
|
| 195 |
|
self::assertEquals($expected, Comparator::compareSchemas( $schema1, $schema2 ) ); |
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
public function testCompareChangedColumns_ChangeType() |
| 199 |
|
{ |
| 200 |
|
$column1 = new Column('charfield1', Type::getType('string')); |
| 201 |
|
$column2 = new Column('charfield1', Type::getType('integer')); |
| 202 |
|
|
| 203 |
|
$c = new Comparator(); |
| 204 |
|
self::assertEquals(array('type'), $c->diffColumn($column1, $column2)); |
| 205 |
|
self::assertEquals(array(), $c->diffColumn($column1, $column1)); |
| 206 |
|
} |
| 207 |
|
|
| 208 |
|
public function testCompareChangedColumns_ChangeCustomSchemaOption() |
| 209 |
|
{ |
|
@@ 856-865 (lines=10) @@
|
| 853 |
|
/** |
| 854 |
|
* @group DBAL-106 |
| 855 |
|
*/ |
| 856 |
|
public function testDiffDecimalWithNullPrecision() |
| 857 |
|
{ |
| 858 |
|
$column = new Column('foo', Type::getType('decimal')); |
| 859 |
|
$column->setPrecision(null); |
| 860 |
|
|
| 861 |
|
$column2 = new Column('foo', Type::getType('decimal')); |
| 862 |
|
|
| 863 |
|
$c = new Comparator(); |
| 864 |
|
self::assertEquals(array(), $c->diffColumn($column, $column2)); |
| 865 |
|
} |
| 866 |
|
|
| 867 |
|
/** |
| 868 |
|
* @group DBAL-204 |