Compare commits

..

1 Commits

Author SHA1 Message Date
Steve Boyd
26e330f5b0
Merge e10f6f421a into e46135be0a 2024-09-27 05:30:35 +12:00
2 changed files with 37 additions and 29 deletions

View File

@ -1,30 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="tests/bootstrap.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"> <!--
<testsuites> Standard module phpunit configuration.
<testsuite name="Default"> Requires PHPUnit ^9
<directory>tests/php</directory> -->
</testsuite> <phpunit bootstrap="tests/bootstrap.php" colors="true">
<!-- Framework ORM tests are split up to run in parallel in github actions CI --> <testsuites>
<testsuite name="framework-core"> <testsuite name="Default">
<!-- Will be run in github actions CI with option exclude-filter /ORM/ --> <directory>tests/php</directory>
<directory>tests/php</directory> </testsuite>
</testsuite> <!-- Framework ORM tests are split up to run in parallel -->
<testsuite name="framework-orm"> <testsuite name="framework-core">
<!-- Will be run in github actions CI with option filter /ORM/ --> <directory>tests/php</directory>
<directory>tests/php</directory> <exclude>
</testsuite> <directory>tests/php/ORM</directory>
<!-- Cache suite is separate so it only runs what it needs to run --> </exclude>
<testsuite name="framework-cache-only"> </testsuite>
<directory>tests/php/Core/Cache</directory> <testsuite name="framework-orm">
</testsuite> <directory>tests/php/ORM</directory>
</testsuites> </testsuite>
<source> <testsuite name="cms">
<include> <directory>vendor/silverstripe/cms/tests</directory>
<directory suffix=".php">.</directory> </testsuite>
</include> <!-- Cache suite is separate so it only runs what it needs to run. Intentionally also included in core above. -->
<exclude> <testsuite name="framework-cache-only">
<directory suffix=".php">tests/</directory> <directory>tests/php/Core/Cache</directory>
<directory suffix=".php">thirdparty/</directory> </testsuite>
</exclude> </testsuites>
</source> <filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">.</directory>
<exclude>
<directory suffix=".php">tests/</directory>
<directory suffix=".php">thirdparty/</directory>
</exclude>
</whitelist>
</filter>
</phpunit> </phpunit>

View File

@ -86,7 +86,7 @@ class DBQueryBuilder
if (Environment::hasEnv('SS_TRACE_DB_QUERY_ORIGIN')) { if (Environment::hasEnv('SS_TRACE_DB_QUERY_ORIGIN')) {
return (bool) Environment::getEnv('SS_TRACE_DB_QUERY_ORIGIN'); return (bool) Environment::getEnv('SS_TRACE_DB_QUERY_ORIGIN');
} }
return static::config()->get('trace_query_origin') ?? false; return static::config()->get('trace_query_origin');
} }
/** /**