-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Make internal Comparator methods protected #5652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -662,22 +662,6 @@ public function testCompareForeignKeyBasedOnPropertiesNotName(): void | |
self::assertNull($tableDiff); | ||
} | ||
|
||
public function testCompareForeignKeyRestrictNoActionAreTheSame(): void | ||
{ | ||
$fk1 = new ForeignKeyConstraint(['foo'], 'bar', ['baz'], 'fk1', ['onDelete' => 'NO ACTION']); | ||
$fk2 = new ForeignKeyConstraint(['foo'], 'bar', ['baz'], 'fk1', ['onDelete' => 'RESTRICT']); | ||
|
||
self::assertFalse($this->comparator->diffForeignKey($fk1, $fk2)); | ||
} | ||
|
||
public function testCompareForeignKeyNamesUnqualifiedAsNoSchemaInformationIsAvailable(): void | ||
{ | ||
$fk1 = new ForeignKeyConstraint(['foo'], 'foo.bar', ['baz'], 'fk1'); | ||
$fk2 = new ForeignKeyConstraint(['foo'], 'baz.bar', ['baz'], 'fk1'); | ||
|
||
self::assertFalse($this->comparator->diffForeignKey($fk1, $fk2)); | ||
} | ||
Comment on lines
-673
to
-679
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test is supposed to cover the fix (411d38f) for #1694 (I can't really find much about the actual issue). This is obviously a hack. From the issue description:
The fact that the schema name of the foreign key is unavailable during schema comparison is a flaw in the API, and doesn't mean that any two foreign with the same name from different schemas are the same key. The fix doesn't take into account the fact that a quoted name can contain a dot. While we're keeping the code, I'll remove this test as not worth reworking. |
||
|
||
public function testDetectRenameColumn(): void | ||
{ | ||
$tableA = new Table('foo'); | ||
|
@@ -1032,16 +1016,6 @@ public function testCompareChangedBinaryColumn(): void | |
self::assertEquals($expected, $this->comparator->compareSchemas($oldSchema, $newSchema)); | ||
} | ||
|
||
public function testCompareQuotedAndUnquotedForeignKeyColumns(): void | ||
{ | ||
$fk1 = new ForeignKeyConstraint(['foo'], 'bar', ['baz'], 'fk1', ['onDelete' => 'NO ACTION']); | ||
$fk2 = new ForeignKeyConstraint(['`foo`'], 'bar', ['`baz`'], 'fk1', ['onDelete' => 'NO ACTION']); | ||
|
||
$diff = $this->comparator->diffForeignKey($fk1, $fk2); | ||
|
||
self::assertFalse($diff); | ||
} | ||
Comment on lines
-1035
to
-1043
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The assumptions under this test are invalid. Quoted and unquoted names may not be equal depending on the platform. This test cannot be reworked with a functional one. |
||
|
||
public function assertSchemaTableChangeCount( | ||
SchemaDiff $diff, | ||
int $newTableCount = 0, | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test has been reworked into
ForeignKeyConstraintTest::testCompareRestrictAndNoActionAreTheSame()
.