-
Notifications
You must be signed in to change notification settings - Fork 47
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
Not working at all with global PHPUnit #48
Comments
I found the explanation, this can be closed.
When the system's phpunit is used, the autoload file is (in my case) This might be a bug in phpunit. It should look in the current working directory first, I think. |
@greg0ire I'll keep it open unless a solution is found, thanks. |
You should close it, because it has nothing to do with this package. The problem probably arises at the very first step : there is no dot in the output, signalling that a test was successful. I think if you remove this test, it will fail on another test, as soon as php tries to autoload something. Since it has the wrong autoloader, it can't autoload anything that isn't also require globally. It probably won't be able to load any class from the library under test, for instance. Another reason to close this is that I have filed an issue in the right place |
Thanks @greg0ire. |
If we run tests based on your library with a global phpunit binary, it fails. But it works with phpunit as a project dependency.
See more details here: sonata-project/SonataAdminSearchBundle#16 (comment)
And the related test case: https://github.com/sonata-project/SonataAdminSearchBundle/blob/72b0a5c5202ae8da33b5c1ea7936afde8e117e1d/Tests/DependencyInjection/Compiler/DatagridBuilderInjectionCompilerPassTest.php
We can't figure out why.
Maybe do you have an explanation?
Thanks.
The text was updated successfully, but these errors were encountered: