Open ShakeyDave opened 9 years ago
I also found this video: https://www.youtube.com/watch?v=1qnWL52wt58 - which says to use php.exe as the CLI executable file, rather than php-win.exe. But it still fell over with the same error...
The problem is clearly that Eclipse isn't finding the PHPUnit 'Library' (which is where the PHPUnit_Util_Configuration class comes from). As PHPUnit is no longer in PEAR these days, the documentation is out of date. I've installed PHPUnit as a project-level dependency using Composer - so what I need to try and work out is how to get Eclipse to find that binary. If indeed it's called a 'Binary'... Eclipse gives me the option to put Libraries on the path, and I've tried all sorts of ways of creating a Library, adding the vendor folder to it etc, but I get the same error each time.
Just today I saw this error, for me it was autoload related. Sorry, I do not have an easy to tell solution for this. But for me, I was on Linux and within Phpstorm, so just to broaden the picture. It happened to me while I was tinkering with autoloaders within unit-tests. I only got this message when I put "@runInSeparateProcess" as annotation to the test.
try the solution they posted here: https://stackoverflow.com/questions/33299149/phpstorm-8-and-phpunit-problems-with-runinseparateprocess
Add to the top of your boostrap file:
if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
define('PHPUNIT_COMPOSER_INSTALL', __DIR__ . '/path/to/composer/vendors/dir/autoload.php');
}
Just today I saw this error, for me it was autoload related. Sorry, I do not have an easy to tell solution for this. But for me, I was on Linux and within Phpstorm, so just to broaden the picture. It happened to me while I was tinkering with autoloaders within unit-tests. I only got this message when I put "@runInSeparateProcess" as annotation to the test.
@ktomk How did you figure this out. Thanks in advance.
@pallavibatra-cpi Sorry I don't specifically remember. Might have been guess work.
Hi - this could be a configuration error by me - I've been following the instructions here: [[http://blog.loftdigital.com/running-phpunit-tests-in-eclipse-pdt]] on a Windows machine, though I've adjusted them to bring things up-to-date (i.e. I've installed PHPUnit as a project dependency using Composer, not PEAR).
Here's the stack trace:
I'm using the V11 x64 Thread Safe build of PHP. Could it be an issue with php-win.exe not recognising namespaces, maybe?