Cannot launch PHPUnit tests (port address 7478)

General discussion on Zend Studio
Post Reply
sown5750
Posts: 13
Joined: Thu Jun 19, 2014 5:37 am

Cannot launch PHPUnit tests (port address 7478)

Post by sown5750 » Tue Aug 19, 2014 12:37 pm

Hi,

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

--Sj

mitcheljh
Posts: 6
Joined: Sat Dec 11, 2010 10:08 pm

Re: Cannot launch PHPUnit tests (port address 7478)

Post by mitcheljh » Sat Oct 11, 2014 9:28 pm

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?

wes_grant
Posts: 13
Joined: Fri May 20, 2011 6:47 pm

Re: Cannot launch PHPUnit tests (port address 7478)

Post by wes_grant » Wed Oct 22, 2014 10:16 pm

For me it turned out there were other PHP errors that were manifesting in this way. Check your console.

marketacumen
Posts: 19
Joined: Thu Jul 15, 2010 9:03 pm

Re: Cannot launch PHPUnit tests (port address 7478)

Post by marketacumen » Mon Apr 30, 2018 11:16 pm

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!
No whining.

Post Reply