You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the tests with the following command(s) behaves as expected:
cd /tmp/phpUnitIssues/relativity/;
/usr/bin/phpunit --configuration configuration.xml
Which results in expected test output of SI
However, running the tests with the following command(s) does not behave as expected:
cd /tmp/phpUnitIssues/;
/usr/bin/phpunit --configuration ./relativity/configuration.xml
Which results in test output of I
The test "SkippedTest" is never run, because it is not found. The paths supplied in the configuration XML seem to be relative to the CWD rather than to the file itself. This requires a user to be in the appropriate directory before running the tests.
Consider the following:
cd /usr/local/bin/apache/htdocs;
<do some work here. editing, configuring, etc, etc>
/usr/bin/phpunit --configuration /tmp/phpUnitIssues/relativity/configuration.xml
PHPUnit will run, and the configuration file will be found, but the relative paths in the configuration file will break. Now, in order to run the tests, the user must leave the directory he's in for the appropriate testing directory, and then run the tests. If there is a failure, he must then change directories back to where he was, and continue working.
I would suggest that all paths inside the configuration file are treated as relative to the config file itself rather than the CWD.
The text was updated successfully, but these errors were encountered:
There have been quite a lot of issues with ,the phpunit.xml.dist and relatives pathes.
I don't remember the whole story but I will investigate it. I believe the inconsistency is there because of BC reasons but it at least could look up 2 places.
Given the following files:
/tmp/phpUnitIssues/relativity/IncompleteTest.php:
/tmp/phpUnitIssues/relativity/SkippedTest.php:
/tmp/phpUnitIssues/relativity/configuration.xml:
Running the tests with the following command(s) behaves as expected:
Which results in expected test output of
SI
However, running the tests with the following command(s) does not behave as expected:
Which results in test output of
I
The test "SkippedTest" is never run, because it is not found. The paths supplied in the configuration XML seem to be relative to the CWD rather than to the file itself. This requires a user to be in the appropriate directory before running the tests.
Consider the following:
PHPUnit will run, and the configuration file will be found, but the relative paths in the configuration file will break. Now, in order to run the tests, the user must leave the directory he's in for the appropriate testing directory, and then run the tests. If there is a failure, he must then change directories back to where he was, and continue working.
I would suggest that all paths inside the configuration file are treated as relative to the config file itself rather than the CWD.
The text was updated successfully, but these errors were encountered: