|
@@ 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 |
|
{ |
|
@@ 829-838 (lines=10) @@
|
| 826 |
|
/** |
| 827 |
|
* @group DBAL-106 |
| 828 |
|
*/ |
| 829 |
|
public function testDiffDecimalWithNullPrecision() |
| 830 |
|
{ |
| 831 |
|
$column = new Column('foo', Type::getType('decimal')); |
| 832 |
|
$column->setPrecision(null); |
| 833 |
|
|
| 834 |
|
$column2 = new Column('foo', Type::getType('decimal')); |
| 835 |
|
|
| 836 |
|
$c = new Comparator(); |
| 837 |
|
self::assertEquals(array(), $c->diffColumn($column, $column2)); |
| 838 |
|
} |
| 839 |
|
|
| 840 |
|
/** |
| 841 |
|
* @group DBAL-204 |