1
0
mirror of synced 2025-02-20 14:13:15 +03:00

[DDC-1601] Fix failing test and remove unused code

This commit is contained in:
Benjamin Eberlei 2012-01-15 12:12:08 +01:00
parent 6ffe4d3dda
commit 9950af2f58
2 changed files with 2 additions and 24 deletions

View File

@ -245,28 +245,6 @@ class SchemaValidator
return $ce;
}
/**
* @param string $columnName
* @param ClassMetadataInfo $class
* @return bool
*/
private function columnExistsOnEntity($columnName, $class)
{
if (isset($class->fieldNames[$columnName])) {
return true;
}
foreach ($class->associationMappings as $assoc) {
if ($assoc['isOwningSide']) {
foreach ($assoc['joinColumns'] as $columnMapping) {
if ($columnMapping['name'] == $columnName) {
return true;
}
}
}
}
return false;
}
/**
* Check if the Database Schema is in sync with the current metadata state.
*

View File

@ -103,8 +103,8 @@ class SchemaValidatorTest extends \Doctrine\Tests\OrmTestCase
$this->assertEquals(
array(
"The referenced column name 'id' does not have a corresponding field with this column name on the class 'Doctrine\Tests\ORM\Tools\InvalidEntity1'.",
"The join columns of the association 'assoc' have to match to ALL identifier columns of the source entity 'Doctrine\Tests\ORM\Tools\InvalidEntity2', however 'key3, key4' are missing."
"The referenced column name 'id' has to be a primary key column on the target entity class 'Doctrine\Tests\ORM\Tools\InvalidEntity1'.",
"The join columns of the association 'assoc' have to match to ALL identifier columns of the target entity 'Doctrine\Tests\ORM\Tools\InvalidEntity2', however 'key1, key2' are missing."
),
$ce
);