Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests not found #1

Open
ktomk opened this issue Jan 13, 2018 · 4 comments
Open

Tests not found #1

ktomk opened this issue Jan 13, 2018 · 4 comments

Comments

@ktomk
Copy link

ktomk commented Jan 13, 2018

When in the Phpunit configuration a relative path to a testsuites directory is used, it is not resolved to the path of the file (as it should), but instead it is resolved to the current working directory which can be
totally different.

additionally even if the current working directory is that directory of the configuration file, it is still not resolved to that current working directory as it is resolved later, especially after including the bootstrap file. e.g. when the bootstrap file changes the working directory (which seems legit), the Phpunit configuration is misinterpreted.

@ktomk
Copy link
Author

ktomk commented Jan 13, 2018

Quick fix for my error case is:

            $path = dirname($this->phpUnitXMLFile);
            if (!strlen($path) || $path === '.') {
                $path = getcwd();
            }
            $this->phpUnitXMLPath = $path . '/';

/E: This fix will only work for the working directory case. It should actually check if the path is relative or absolute and if it is relative then prefix by the current working directory.

@paterik
Copy link
Contributor

paterik commented May 15, 2018

Thank's for your issue ... I'll fix this with my (last) update for this project - phpunit seems to be more supportive in evaluating of missing/incorrect coverage annotations so this project seems to be obsolete now :-/

@paterik
Copy link
Contributor

paterik commented May 15, 2018

can you please provide a corresponding pull-request (to simplify that issue for me)? :) ... thank you + kind regards ...

@ktomk
Copy link
Author

ktomk commented May 16, 2018

@paterik: I'm not aware but interested in the changes in Phpunit which levitate this issue, do you have some more info? As for the PR I can file the changes as such, let me check my local clone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants