I can run phpunit effortlessly from commandline, no hitches there, but I thought it might be easier if I can run it directly from eclipse. I have never set up eclipse PHPUnit before so I followed a youtube video to set up PHPunit. That one fails just as bad as the default php unit run the PDT enviroment provides.
But when I set up PHPUnit I get two errors and 0 hits on Google where to start resolving the issues.
I'm using php 7.2 TS on a windows 7 64bit system with Eclipse Oxygen.
When I try to run the tests I get the following error as a popup
Cannot launch PHPUnit tests (port address 7478): Accept timed out

And in the console I get:
PHPUnit 6.2.4 by Sebastian Bergmann and contributors.
Could not use "PHPUnitLogger" as printer.
I'm trying to run the tests under OctoberCMS, which is based upon Laravel. And as I said, the unit tests work as they should in the console.
What do I need to change to get PHPUnit working in eclipse?
I stumbled over this question since I had the same problem with Eclipse. In case someone else finds this problem, here is my solution:
In the "plugins" folder of your Eclipse installation you can find the File PHPUnitLogger.php. On Linux you can find it with the "locate" command, but it should be something like
<your_eclipse_folder>/plugins/org.eclipse.php.phpunit_<some_version>/resources/printer/PHPUnitLogger.php
Load this file in your bootstrap.php via require_once.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With