mirror of
https://github.com/doctrine/orm.git
synced 2026-04-28 08:53:20 +02:00
3e21c50f61
Builds using the github actions phpunit.xml files were not properly recognising driver-specific configuration values, so were all falling back to use the in-memory sqlite database instead of the expected driver. This also meant a number of tests were skipped as they rely on functionality not available in sqlite. This commit addresses that by: * REMOVING the automatic fallback to the sqlite memory database - phpunit.xml must now always specify explicit parameters for the desired connection. * Displaying the active driver in the build output for visibility and debugging. * Changing the way TestUtil loads the database config in line with the equivalent logic in doctrine/dbal, and to support the way that the config is/was specified in the phpunit.xml files for CI. Note that this means a couple of the expected config variable names have changed. Developers that are using customised phpunit.xml files locally will need to update them to provide: * Database config variables if they want to use the sqlite/memory driver - see phpunit.xml.dist for details. * `db_driver` instead of `db_type` * `db_user` instead of `db_username` * `db_dbname` instead of `db_name` * And, if in use, the equivalent changes to the `tmpdb_` values The other change is that now if you provide any value for `db_driver` we will attempt to create that connection type and that will throw if other details (username / password / etc as required by the driver) are not provided. Previously providing partial configuration would cause TestUtil to silently fall back to the in-memory sqlite driver.
37 lines
1.1 KiB
XML
37 lines
1.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="../../vendor/phpunit/phpunit/phpunit.xsd"
|
|
colors="true"
|
|
beStrictAboutOutputDuringTests="true"
|
|
beStrictAboutTodoAnnotatedTests="true"
|
|
failOnRisky="true"
|
|
>
|
|
<php>
|
|
<!-- use an in-memory sqlite database -->
|
|
<var name="db_driver" value="pdo_sqlite"/>
|
|
<var name="db_memory" value="true"/>
|
|
|
|
<!-- necessary change for some CLI/console output test assertions -->
|
|
<env name="COLUMNS" value="120"/>
|
|
</php>
|
|
|
|
<testsuites>
|
|
<testsuite name="Doctrine DBAL Test Suite">
|
|
<directory>../../../tests</directory>
|
|
</testsuite>
|
|
</testsuites>
|
|
|
|
<filter>
|
|
<whitelist>
|
|
<directory suffix=".php">../../../lib/Doctrine</directory>
|
|
</whitelist>
|
|
</filter>
|
|
|
|
<groups>
|
|
<exclude>
|
|
<group>performance</group>
|
|
<group>locking_functional</group>
|
|
</exclude>
|
|
</groups>
|
|
</phpunit>
|