Opened 6 years ago
Closed 6 years ago
#45131 closed defect (bug) (fixed)
Paths are incorrect in multisite.xml
Reported by: | danielbachhuber | Owned by: | |
---|---|---|---|
Milestone: | 5.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | fixed-5.0 |
Focuses: | multisite | Cc: |
Description (last modified by )
In [25294], the base directory for <exclude>
files was changed from tests/
to tests/phpunit/tests/
, e.g.
<exclude>tests/phpunit/tests/actions/closures.php</exclude>
However, when Grunt runs phpunit -c tests/phpunit/multisite.xml --verbose
from the project root, <exclude>
paths are calculated relative to the location of multisite.xml
.
I think [25294] is wrong, and the path should be:
<exclude>tests/actions/closures.php</exclude>
Maybe PHPUnit changed how it calculate paths? Here's how I discovered it:
- Failed build: https://github.com/danielbachhuber/wordpress-develop/pull/2/commits/68970705bc0c06f13b744999bc9d7bad338fbae7
- Passed build: https://github.com/danielbachhuber/wordpress-develop/pull/2/commits/8a3a9949225ee84b81463682953c210aab31d264
From https://github.com/danielbachhuber/wordpress-develop/pull/2
Change History (10)
This ticket was mentioned in Slack in #core-restapi by danielbachhuber. View the logs.
6 years ago
#5
in reply to:
↑ description
@
6 years ago
Replying to danielbachhuber:
Maybe PHPUnit changed how it calculate paths?
It did: https://github.com/sebastianbergmann/phpunit/commit/9740a586a143be686aeab316168dfc02c5fb4a9c
[BC BREAK]
All relative paths in a configuration file are now resolved relative to that configuration file. When upgrading, you may need to update relative paths for the following configurations:
testSuiteLoaderFile
printerFile
testsuites/file
testsuites/exclude
Basically, PHPUnit 3.6.x expects a path relative to the checkout root, PHPUnit 4.x.x and later versions expect a path relative to the configuration file.
So [25294] was not wrong, it was just specific to PHPUnit 3.6.x. Before [43768], all excludes were only relevant for PHP 5.2.x / PHPUnit 3.6.x, and later versions just ignored them, so the path didn't matter.
For rest-autosaves-controller.php
, I'd suggest including both paths, that should work for all PHPUnit versions.
In 43769: