Skip to content
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 #599

Closed
mattmccormick opened this issue Jun 28, 2012 · 1 comment
Closed

fsockopen(): unable to connect to localhost:4444 #599

mattmccormick opened this issue Jun 28, 2012 · 1 comment

Comments

@mattmccormick
Copy link

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)
@edorian
Copy link
Contributor

edorian commented Sep 24, 2012

Sorry for not noticing this one earlier.

Selenium issues are tracked at https://github.com/sebastianbergmann/phpunit-selenium and it's currently maintained by someone else :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants