Page 1 of 1

Cannot launch PHPUnit tests (port address 7478)

Posted: Tue Aug 19, 2014 12:37 pm
by sown5750

i am trying to run the phpunit on Zend studio but while doing that i get error message like this
Cannot launch PHPUnit tests (pot address 7478): Accept timed out
how can i fix this problem?


Re: Cannot launch PHPUnit tests (port address 7478)

Posted: Sat Oct 11, 2014 9:28 pm
by mitcheljh
I have the same issue.
This is the first time I've ever tried the PHPUnit test features.

I'm wondering if it works for anyone?

Re: Cannot launch PHPUnit tests (port address 7478)

Posted: Wed Oct 22, 2014 10:16 pm
by wes_grant
For me it turned out there were other PHP errors that were manifesting in this way. Check your console.

Re: Cannot launch PHPUnit tests (port address 7478)

Posted: Mon Apr 30, 2018 11:16 pm
by marketacumen
I was getting errors like this:

Code: Select all

Fatal error: Uncaught Exception: Class PHPUnit_Util_Printer called from  spl_autoload_call: invoked from:
	(autoloader code)
	closure: -none- autoloader->php_autoloader("PHPUnit_Util_Printer")
	closure: -none- -noclass-spl_autoload_call("PHPUnit_Util_Printer")
	/private/var/folders/f3/d7f6t5bd6x55n9k7gl__shdw0000z_/T/zendprinter/ZendPHPUnitLogger.php: 13 -noclass-class_exists("PHPUnit_Util_Printer")
	/Users/someone/ma/project/vendor/phpunit/phpunit/src/TextUI/Command.php: 930 -noclass-require("/private/var/folders/f3/d7f6t5bd6x55n9k7gl__shdw0000z_/T/zendprinter/ZendPHPUnitLogger.php")
	/Users/someone/ma/project/vendor/phpunit/phpunit/src/TextUI/Command.php: 849 PHPUnit\TextUI\Command->handlePrinter("ZendPHPUnitLogger")
	/Users/someone/ma/project/vendor/phpunit/phpunit/src/TextUI/Command.php: 159 PHPUnit\TextUI\Command->handleArguments(array)
	/Users/someone/ma/project/vendor/phpunit/phpunit/src/TextUI/Command.php: 148 PHPUnit\TextUI\Command->run( in /Users/someone/ma/project/classes/Autoloader.php on line 153
This was in the "Debug Output" window when running a test.

What worked for me was:
  • Adding a PHPUnit Configuration file in the Debug Configuration panel - it should point to your local phpunit.xml
  • Use composer's PHPUnit (composer) checked
The issue appears to be that Zend is attempting to use an older version of PHPUnit which uses the old-style class names; hence the classes aren't found. Adding the phpunit.xml file to the parameters must force Zend to use the locally installed version. I can now run and debug PHPUnit code easily!