Skip to content

Commit

Permalink
Remove AllTests approach to PHPUnit and work with a phpunit.xml.dist …
Browse files Browse the repository at this point in the history
…from the top level of the repository.
  • Loading branch information
beberlei committed Jun 18, 2011
1 parent 8e8a2c0 commit 983dd1d
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 207 deletions.
24 changes: 21 additions & 3 deletions tests/dbproperties.xml.dev → phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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 <filename> ...
Example: phpunit --configuration mysqlconf.xml AllTests
tests/ folder: phpunit -c <filename> ...
Example: phpunit -c mysqlconf.xml
-->
<phpunit>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="./tests/Doctrine/Tests/TestInit.php"
>
<php>
<!-- "Real" test database -->
<!-- Uncomment, otherwise SQLite runs
<var name="db_type" value="pdo_mysql"/>
<var name="db_host" value="localhost" />
<var name="db_username" value="root" />
<var name="db_password" value="" />
<var name="db_name" value="doctrine_tests" />
<var name="db_port" value="3306"/>
-->
<!--<var name="db_event_subscribers" value="Doctrine\DBAL\Event\Listeners\OracleSessionInit">-->

<!-- Database for temporary connections (i.e. to drop/create the main database) -->
Expand All @@ -30,4 +42,10 @@
<var name="tmpdb_name" value="doctrine_tests_tmp" />
<var name="tmpdb_port" value="3306"/>
</php>

<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>./tests/Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>
</phpunit>
33 changes: 0 additions & 33 deletions tests/Doctrine/Tests/AllTests.php

This file was deleted.

83 changes: 0 additions & 83 deletions tests/Doctrine/Tests/DBAL/AllTests.php

This file was deleted.

53 changes: 0 additions & 53 deletions tests/Doctrine/Tests/DBAL/Functional/AllTests.php

This file was deleted.

8 changes: 0 additions & 8 deletions tests/Doctrine/Tests/DbalFunctionalTestSuite.php

This file was deleted.

10 changes: 0 additions & 10 deletions tests/Doctrine/Tests/DbalTestSuite.php

This file was deleted.

11 changes: 0 additions & 11 deletions tests/Doctrine/Tests/DoctrineTestSuite.php

This file was deleted.

10 changes: 4 additions & 6 deletions tests/Doctrine/Tests/TestInit.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Common', __DIR__ . '/../../../lib/vendor/doctrine-common/lib');
$classLoader->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()
);

0 comments on commit 983dd1d

Please sign in to comment.