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

Windows support #6

Closed
jmkgreen opened this issue Dec 10, 2012 · 3 comments
Closed

Windows support #6

jmkgreen opened this issue Dec 10, 2012 · 3 comments

Comments

@jmkgreen
Copy link

Trying to do some testing on my Windows workstation but PHP_Invoker does not install (pcntl not supported).

PHP_Unit appears to require PHP_Invoker however. Is Windows simply not going to work as a testing platform or am I not following something..?

@sebastianbergmann
Copy link
Owner

PHP_Invoker is an optional dependency of PHPUnit. The feature of PHPUnit that depends on PHP_Invoker is not available when PHP_Invoker (or its dependency ext/pcntl) is not installed.

@niveuseverto
Copy link

This is depends on current Autoload procedure (Mine for example throws exceptions if no class found), so PHPUnit fails to start.

@Fahr
Copy link

Fahr commented Apr 4, 2013

The issue with custom autoloaders can be easily avoided by setting the optional second parameter of class_exists on line 409 in GlobalState.php to false. That is how I got PHPUnit to work on Windows with a project that uses a custom autoloader (which also throws an exception).

so PHPUnit\Util\GlobalState.php line 409 from

    if (!class_exists($className)) {

to

    if (!class_exists($className, false)) {

and it will work, on windows, with a custom autoloader.
This might be a change worth using anyway, as it does not seem to break anything else.

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

4 participants