diff --git a/ci/travis/install-mariadb.sh b/ci/travis/install-mariadb.sh deleted file mode 100644 index cda81e9bcba..00000000000 --- a/ci/travis/install-mariadb.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -sudo docker run \ - -d \ - -e MYSQL_ALLOW_EMPTY_PASSWORD=yes \ - -e MYSQL_DATABASE=doctrine_tests \ - -p 33306:3306 \ - --name mariadb \ - mariadb:${MARIADB_VERSION} - -sudo docker exec -i mariadb bash <<< 'until echo \\q | mysql doctrine_tests > /dev/null 2>&1 ; do sleep 1; done' diff --git a/docs/en/reference/testing.rst b/docs/en/reference/testing.rst index 9019a64ac94..fdde5b238ff 100644 --- a/docs/en/reference/testing.rst +++ b/docs/en/reference/testing.rst @@ -62,6 +62,31 @@ multiple concurrent database connections, transactions, locking, performance-rel In such cases, it is still important that a pull request fixing the issues is accompanied by a free-form reproducer that demonstrates the issue being fixed. +Running Integration Tests locally +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The default ``phpunit.xml.dist`` configuration file is set up to run the +integration tests against SQLite, but you need to enable the extension +``pdo_sqlite`` in your PHP configuration. + +To run the integration tests against another platform, you can use one +of the configuration files used in our continuous integration setup. +Those are stored under ``ci/github/``. + +For instance, to run tests against MySQL using the PDO driver, you +should spin up a MySQL server, enable the ``pdo_mysql`` extension, and +then run the following command: + +.. code-block:: console + + $ phpunit -c ci/github/pdo_mysql.xml + +We do not currently have specific instructions on how to run a Database +server, but we do recommend Docker as a convenient way to do so. +We do not recommend running against a particular version of the chosen +RDBMS either, as long as you pick one of the +:doc:`officially supported versions `. + Recommendations on Writing Tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b67808e0c42..bfca45e9804 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -22,24 +22,11 @@ - - - - - - - - - - -