-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fsockopen(): unable to connect to localhost:4444 #184
Comments
This is what I get:
Which version of PHPUnit_Selenium are you using? |
I'm running 1.2.7 |
Can you try upgrading to the current 1.2.9 to understand if this still needs to be fixed? |
Upgraded to 1.2.10 and upgraded PHPUnit to 3.7.9 and PHP to 5.3.6. I am still getting the same error. |
(I've copied this issue from sebastianbergmann/phpunit#599)
I am running PHPUnit 3.6.11 with Selenium tests included. Sometimes I forget to start the Selenium server. If I run the tests, it fails at the first test with a PHP error:
Looking at the code, it seems that the test should just be skipped but instead it completely quits. Looking at the documentation for fsockopen, I don't think it should result in a PHP error so it may be a bug with PHP itself. I am running PHP 5.3.5.
Description:
fsockopen(): unable to connect to localhost:4444 (Connection refused)
Source File:
/usr/share/php/PHPUnit/Extensions/SeleniumTestCase.php(738)
Stack Trace:
#0 fsockopen('localhost',4444,0,'',10)
/usr/share/php/PHPUnit/Extensions/SeleniumTestCase.php(738)
#1 PHPUnit_Extensions_SeleniumTestCase->skipWithNoServerRunning()
/usr/share/php/PHPUnit/Extensions/SeleniumTestCase.php(776)
#2 PHPUnit_Extensions_SeleniumTestCase->runTest()
/usr/share/php/PHPUnit/Framework/TestCase.php(804)
#3 PHPUnit_Framework_TestCase->runBare()
/usr/share/php/PHPUnit/Framework/TestResult.php(649)
#4 PHPUnit_Framework_TestResult->run(SiteTest)
/usr/share/php/PHPUnit/Framework/TestCase.php(751)
#5 PHPUnit_Framework_TestCase->run(PHPUnit_Framework_TestResult)
/usr/share/php/PHPUnit/Extensions/SeleniumTestCase.php(643)
#6 PHPUnit_Extensions_SeleniumTestCase->run(PHPUnit_Framework_TestResult)
/usr/share/php/PHPUnit/Framework/TestSuite.php(772)
#7 PHPUnit_Framework_TestSuite->runTest(SiteTest,PHPUnit_Framework_TestResult)
/usr/share/php/PHPUnit/Framework/TestSuite.php(745)
#8 PHPUnit_Framework_TestSuite->run(PHPUnit_Framework_TestResult,,array(0),array(0),)
/usr/share/php/PHPUnit/Framework/TestSuite.php(705)
#9 PHPUnit_Framework_TestSuite->run(PHPUnit_Framework_TestResult,,array(0),array(0),)
/usr/share/php/PHPUnit/TextUI/TestRunner.php(325)
#10 PHPUnit_TextUI_TestRunner->doRun(PHPUnit_Framework_TestSuite,array(4))
/usr/share/php/PHPUnit/TextUI/Command.php(192)
#11 PHPUnit_TextUI_Command->run(array(3),1)
/usr/share/php/PHPUnit/TextUI/Command.php(130)
#12 PHPUnit_TextUI_Command::main()
/usr/bin/phpunit(46)
The text was updated successfully, but these errors were encountered: