From fdf1f1b29e049c85330cdda95e9336652352515a Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sun, 4 Jul 2010 13:17:26 +0200 Subject: [PATCH] Fix testsuite by re-ordering how tests are executed, added debug capabilities for SQL Global State problems using SQL Comments when DOCTRINE_MARK_SQL_LOGS phpunit configuration variable isset --- tests/Doctrine/Tests/ORM/Functional/AllTests.php | 3 ++- .../Doctrine/Tests/ORM/Functional/SchemaTool/AllTests.php | 1 + .../ORM/Functional/{Ticket => SchemaTool}/DDC214Test.php | 5 ++++- tests/Doctrine/Tests/OrmFunctionalTestCase.php | 8 ++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) rename tests/Doctrine/Tests/ORM/Functional/{Ticket => SchemaTool}/DDC214Test.php (94%) diff --git a/tests/Doctrine/Tests/ORM/Functional/AllTests.php b/tests/Doctrine/Tests/ORM/Functional/AllTests.php index c0827bcfb..9d25377c4 100644 --- a/tests/Doctrine/Tests/ORM/Functional/AllTests.php +++ b/tests/Doctrine/Tests/ORM/Functional/AllTests.php @@ -57,9 +57,10 @@ class AllTests $suite->addTestSuite('Doctrine\Tests\ORM\Functional\PostgreSQLIdentityStrategyTest'); $suite->addTest(Locking\AllTests::suite()); - $suite->addTest(SchemaTool\AllTests::suite()); $suite->addTest(Ticket\AllTests::suite()); + $suite->addTest(SchemaTool\AllTests::suite()); + return $suite; } } diff --git a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/AllTests.php b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/AllTests.php index 90826bb24..646d8c07d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/AllTests.php +++ b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/AllTests.php @@ -21,6 +21,7 @@ class AllTests $suite->addTestSuite('Doctrine\Tests\ORM\Functional\SchemaTool\MySqlSchemaToolTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Functional\SchemaTool\PostgreSqlSchemaToolTest'); + $suite->addTestSuite('Doctrine\Tests\ORM\Functional\SchemaTool\DDC214Test'); return $suite; } diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC214Test.php b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/DDC214Test.php similarity index 94% rename from tests/Doctrine/Tests/ORM/Functional/Ticket/DDC214Test.php rename to tests/Doctrine/Tests/ORM/Functional/SchemaTool/DDC214Test.php index 7f3df9b15..a6682b6a8 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC214Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/DDC214Test.php @@ -1,12 +1,15 @@ sharedFixture['conn']->getDatabasePlatform()->getName(), array("mysql", "postgresql"))) { + $this->sharedFixture['conn']->executeQuery('SELECT 1 /*' . get_class($this) . '*/'); + } else if ($this->sharedFixture['conn']->getDatabasePlatform()->getName() == "oracle") { + $this->sharedFixture['conn']->executeQuery('SELECT 1 /*' . get_class($this) . '*/ FROM dual'); + } + } if ( ! $this->_em) { $this->_em = $this->_getEntityManager();