PHPUnit TextUI / command.php not found

I installed phpunit for my symfony2 project as follows: How to use phpunit installed from composer?

But now I get the following error:

Warning: enable (C: \ Program Files (x86) \ Zend \ Apache2 \ Program Files (x86) \ Zend \ Apache2 \ htdocs \ project1 \ vendor \ phpunit \ phpunit \ PHPUnit \ TextUI \ Command.php): could not open the stream : there is no such file or directory in C: \ Program Files (x86) \ Zend \ Apache2 \ htdocs \ project1 \ vendor \ composer \ ClassLoader.php on line 150

The file exists and is located in the autoload_classmap file, so I'm not sure why I get this error when running vendor/bin/phpunit -c app

+6
symfony phpunit composer-php
Dec 07
source share
2 answers

You should only fix the basePath problem: instead:

C:\Program Files (x86)\Zend\Apache2\Program Files (x86)\Zend\Apache2\htdocs\project1\vendor\phpunit\phpunit\PHPUnit\TextUI\Command.php

it should be like this: C:\Program Files (x86)\Zend\Apache2\htdocs\project1\vendor\phpunit\phpunit\PHPUnit\TextUI\Command.php

You should go and read line 150 of composer\ClassLoader.php and, if possible, add some echo or var_dump to debug and view the contents of the variables used there, indicating the wrong path.

+3
Dec 17 '12 at 21:26
source share

Program Files (x86)\Zend\Apache2\

appear twice in the inclusion error, but not in the open stream error.

open stream: No such file or directory in C:\Program Files (x86)\Zend\Apache2\htdocs\project1\vendor\composer\ClassLoader.php on line 150

+2
Dec 11 '12 at 7:26
source share



All Articles