From 9d6890e6cad85f41d7d593394d0015a0b96eda7f Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Wed, 14 Jan 2015 18:50:17 +0100 Subject: [PATCH] #881 DDC-2825 - expectations are the first parameter in an assertion --- .../Tests/ORM/Functional/Ticket/DDC2825Test.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2825Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2825Test.php index a403a0932..e87329e9a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2825Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2825Test.php @@ -101,13 +101,12 @@ class DDC2825Test extends \Doctrine\Tests\OrmFunctionalTestCase protected function checkClassMetadata($className, $expectedSchemaName, $expectedTableName) { $classMetadata = $this->_em->getClassMetadata($className); - $quoteStrategy = $this->_em->getConfiguration()->getQuoteStrategy(); $platform = $this->_em->getConnection()->getDatabasePlatform(); - $quotedTableName = $quoteStrategy->getTableName($classMetadata, $platform); + $quotedTableName = $this->_em->getConfiguration()->getQuoteStrategy()->getTableName($classMetadata, $platform); // Check if table name and schema properties are defined in the class metadata - $this->assertEquals($classMetadata->table['name'], $expectedTableName); - $this->assertEquals($classMetadata->table['schema'], $expectedSchemaName); + $this->assertEquals($expectedTableName, $classMetadata->table['name']); + $this->assertEquals($expectedSchemaName, $classMetadata->table['schema']); if ($this->_em->getConnection()->getDatabasePlatform()->supportsSchemas()) { $fullTableName = sprintf('%s.%s', $expectedSchemaName, $expectedTableName); @@ -115,11 +114,13 @@ class DDC2825Test extends \Doctrine\Tests\OrmFunctionalTestCase $fullTableName = sprintf('%s__%s', $expectedSchemaName, $expectedTableName); } - $this->assertEquals($quotedTableName, $fullTableName); + $this->assertEquals($fullTableName, $quotedTableName); // Checks sequence name validity - $expectedSchemaName = $fullTableName . '_' . $classMetadata->getSingleIdentifierColumnName() . '_seq'; - $this->assertEquals($expectedSchemaName, $classMetadata->getSequenceName($platform)); + $this->assertEquals( + $fullTableName . '_' . $classMetadata->getSingleIdentifierColumnName() . '_seq', + $classMetadata->getSequenceName($platform) + ); } }