Commit 03827efe authored by Benjamin Eberlei's avatar Benjamin Eberlei

[DBAL-617] Add test for unquoted foreign key column comparison.

parent e41a6458
......@@ -913,6 +913,20 @@ class ComparatorTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema));
}
/**
* @group DBAL-617
*/
public function testCompareQuotedAndUnquotedForeignKeyColumns()
{
$fk1 = new ForeignKeyConstraint(array("foo"), "bar", array("baz"), "fk1", array('onDelete' => 'NO ACTION'));
$fk2 = new ForeignKeyConstraint(array("`foo`"), "bar", array("`baz`"), "fk1", array('onDelete' => 'NO ACTION'));
$comparator = new Comparator();
$diff = $comparator->diffForeignKey($fk1, $fk2);
$this->assertFalse($diff);
}
/**
* @param SchemaDiff $diff
* @param int $newTableCount
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment