diff --git a/.gitignore b/.gitignore index d74f914f79f50..90aec3d72409b 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ CVS /.project /.buildpath /.cache -.phpunit.result.cache +.phpunit.cache phpunit.xml # Composer support. Do not ignore composer.json, or composer.lock. These should be shipped by us. composer.phar diff --git a/lib/phpunit/classes/util.php b/lib/phpunit/classes/util.php index 2f64554b8a95d..34737c0d41695 100644 --- a/lib/phpunit/classes/util.php +++ b/lib/phpunit/classes/util.php @@ -664,9 +664,10 @@ public static function build_component_config_files() { '', $fcontents); - // fix link to schema + // Fix link to schema, bootstrap and cache directory. $level = substr_count(str_replace('\\', '/', $cpath), '/') - substr_count(str_replace('\\', '/', $CFG->dirroot), '/'); $fcontents = str_replace('lib/phpunit/', str_repeat('../', $level).'lib/phpunit/', $fcontents); + $fcontents = str_replace('.phpunit.cache', str_repeat('../', $level) . '.phpunit.cache', $fcontents); // Write the file $result = false; diff --git a/lib/phpunit/phpunit.xsd b/lib/phpunit/phpunit.xsd index 3785d21fef773..269b7a3aeb489 100644 --- a/lib/phpunit/phpunit.xsd +++ b/lib/phpunit/phpunit.xsd @@ -2,7 +2,7 @@ - This Schema file defines the rules by which the XML configuration file of PHPUnit 9.5 may be structured. + This Schema file defines the rules by which the XML configuration file of PHPUnit 10.2 may be structured. @@ -11,18 +11,48 @@ Root Element - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -32,7 +62,6 @@ - @@ -57,62 +86,19 @@ - - - - - - + - + - - - - - + - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -125,23 +111,6 @@ - - - - - - - - - - - - - - - - - @@ -164,17 +133,6 @@ - - - - - - - - - - - @@ -207,65 +165,64 @@ - + + - - - - - - - + + + + + + + + + - + - - - - - + - - + - - - - + - + + + + + + - + - @@ -279,11 +236,41 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -301,8 +288,6 @@ - - @@ -319,6 +304,12 @@ + + + + + + diff --git a/phpunit.xml.dist b/phpunit.xml.dist index fd7faeecc081b..08cdaae7a7363 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,19 +3,20 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="lib/phpunit/phpunit.xsd" bootstrap="lib/phpunit/bootstrap.php" - convertErrorsToExceptions="true" - convertNoticesToExceptions="true" - convertWarningsToExceptions="true" processIsolation="false" backupGlobals="false" - backupStaticAttributes="false" + backupStaticProperties="false" cacheResult="false" - stopOnError="false" - stopOnFailure="false" - stopOnIncomplete="false" - stopOnSkipped="false" - beStrictAboutTestsThatDoNotTestAnything="false" + cacheDirectory=".phpunit.cache" + failOnNotice="true" + failOnWarning="true" + displayDetailsOnTestsThatTriggerDeprecations="true" + displayDetailsOnTestsThatTriggerErrors="true" + displayDetailsOnTestsThatTriggerNotices="true" + displayDetailsOnTestsThatTriggerWarnings="true" + beStrictAboutChangesToGlobalState="true" beStrictAboutOutputDuringTests="true" + beStrictAboutTestsThatDoNotTestAnything="false" > @@ -228,8 +229,8 @@ - + - +