diff --git a/tests/dbproperties.xml.dev b/phpunit.xml.dist similarity index 66% rename from tests/dbproperties.xml.dev rename to phpunit.xml.dist index 503cb858eb8..fe1d515e46b 100644 --- a/tests/dbproperties.xml.dev +++ b/phpunit.xml.dist @@ -8,18 +8,30 @@ 2) Edit the file and fill in your settings (database name, type, username, etc.) Just change the "value"s, not the names of the var elements. 3) To run the tests against the database type the following from within the - tests/ folder: phpunit --configuration ... - Example: phpunit --configuration mysqlconf.xml AllTests + tests/ folder: phpunit -c ... + Example: phpunit -c mysqlconf.xml --> - + + @@ -30,4 +42,10 @@ + + + + ./tests/Doctrine/Tests/DBAL + + \ No newline at end of file diff --git a/tests/Doctrine/Tests/AllTests.php b/tests/Doctrine/Tests/AllTests.php deleted file mode 100644 index a293cf3d8e0..00000000000 --- a/tests/Doctrine/Tests/AllTests.php +++ /dev/null @@ -1,33 +0,0 @@ -addTest(DBAL\AllTests::suite()); - - return $suite; - } -} - -if (PHPUnit_MAIN_METHOD == 'AllTests::main') { - AllTests::main(); -} \ No newline at end of file diff --git a/tests/Doctrine/Tests/DBAL/AllTests.php b/tests/Doctrine/Tests/DBAL/AllTests.php deleted file mode 100644 index ff50a375dec..00000000000 --- a/tests/Doctrine/Tests/DBAL/AllTests.php +++ /dev/null @@ -1,83 +0,0 @@ -addTestSuite('Doctrine\Tests\DBAL\Platforms\SqlitePlatformTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Platforms\MySqlPlatformTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Platforms\PostgreSqlPlatformTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Platforms\MsSqlPlatformTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Platforms\OraclePlatformTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Platforms\ReservedKeywordsValidatorTest'); - - // Type tests - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\ArrayTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\ObjectTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\DateTimeTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\DateTimeTzTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\VarDateTimeTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\DateTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\TimeTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\BooleanTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\DecimalTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\IntegerTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\SmallIntTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\StringTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Types\FloatTest'); - - // Schema tests - $suite->addTestSuite('Doctrine\Tests\DBAL\Schema\ColumnTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Schema\IndexTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Schema\TableTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Schema\SchemaTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Schema\Visitor\SchemaSqlCollectorTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Schema\ComparatorTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Schema\SchemaDiffTest'); - - // Query Builder tests - $suite->addTestSuite('Doctrine\Tests\DBAL\Query\Expression\CompositeExpressionTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Query\Expression\ExpressionBuilderTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Query\QueryBuilderTest'); - - // Driver manager test - $suite->addTestSuite('Doctrine\Tests\DBAL\DriverManagerTest'); - - // Connection test - $suite->addTestSuite('Doctrine\Tests\DBAL\ConnectionTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\SQLParserUtilsTest'); - - // Events and Listeners - $suite->addTestSuite('Doctrine\Tests\DBAL\Events\OracleSessionInitTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Events\MysqlSessionInitTest'); - - // All Functional DBAL tests - $suite->addTest(Functional\AllTests::suite()); - - return $suite; - } -} - -if (PHPUnit_MAIN_METHOD == 'Dbal_Platforms_AllTests::main') { - AllTests::main(); -} diff --git a/tests/Doctrine/Tests/DBAL/Functional/AllTests.php b/tests/Doctrine/Tests/DBAL/Functional/AllTests.php deleted file mode 100644 index ff952f5d4f7..00000000000 --- a/tests/Doctrine/Tests/DBAL/Functional/AllTests.php +++ /dev/null @@ -1,53 +0,0 @@ -getSchemaManager(); - - if ($sm instanceof \Doctrine\DBAL\Schema\SqliteSchemaManager) { - $suite->addTestSuite('Doctrine\Tests\DBAL\Functional\Schema\SqliteSchemaManagerTest'); - } else if ($sm instanceof \Doctrine\DBAL\Schema\MySqlSchemaManager) { - $suite->addTestSuite('Doctrine\Tests\DBAL\Functional\Schema\MySqlSchemaManagerTest'); - } else if ($sm instanceof \Doctrine\DBAL\Schema\PostgreSqlSchemaManager) { - $suite->addTestSuite('Doctrine\Tests\DBAL\Functional\Schema\PostgreSqlSchemaManagerTest'); - } else if ($sm instanceof \Doctrine\DBAL\Schema\OracleSchemaManager) { - $suite->addTestSuite('Doctrine\Tests\DBAL\Functional\Schema\OracleSchemaManagerTest'); - } else if ($sm instanceof \Doctrine\DBAL\Schema\DB2SchemaManager) { - $suite->addTestSuite('Doctrine\Tests\DBAL\Functional\Schema\Db2SchemaManagerTest'); - } - $suite->addTestSuite('Doctrine\Tests\DBAL\Functional\ConnectionTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Functional\DataAccessTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Functional\WriteTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Functional\LoggingTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Functional\TypeConversionTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Functional\PortabilityTest'); - $suite->addTestSuite('Doctrine\Tests\DBAL\Functional\ModifyLimitQueryTest'); - - return $suite; - } -} - -if (PHPUnit_MAIN_METHOD == 'Dbal_Functional_AllTests::main') { - AllTests::main(); -} diff --git a/tests/Doctrine/Tests/DbalFunctionalTestSuite.php b/tests/Doctrine/Tests/DbalFunctionalTestSuite.php deleted file mode 100644 index f7413e6cbbe..00000000000 --- a/tests/Doctrine/Tests/DbalFunctionalTestSuite.php +++ /dev/null @@ -1,8 +0,0 @@ -register(); -$classLoader = new \Doctrine\Common\ClassLoader('Doctrine'); +$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\DBAL', __DIR__ . '/../../../lib'); +$classLoader->register(); + +$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Tests', __DIR__ . '/../../'); $classLoader->register(); $classLoader = new \Doctrine\Common\ClassLoader('Symfony', __DIR__ . "/../../../lib/vendor"); $classLoader->register(); -set_include_path( - __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' - . PATH_SEPARATOR . - get_include_path() -); \ No newline at end of file