sebastianbergmann/phpunit — Issue #399: Failed Selenium Testcases throw a Fatal error
Author: syeo66
Created: 2011-11-07 14:26:57+00:00
State: open

When I run a testcase using selenium it throws a fatal error.

It looks like in PHPUnit/Framework/Constraint.php on line 92 there is a PHPUnit_Framework_ComparisonFailure object missing which is null then.

Fatal error: Call to a member function toString() on a non-object in /usr/local/zend/share/pear/PHPUnit/Extensions/SeleniumTestCase.php on line 1041

Call Stack:
0.0002 322364 1. {main}() /usr/local/zend/bin/phpunit:0
0.0048 708952 2. PHPUnit_TextUI_Command::main() /usr/local/zend/bin/phpunit:46
0.0049 709288 3. PHPUnit_TextUI_Command->run() /usr/local/zend/share/pear/PHPUnit/TextUI/Command.php:126
0.5242 14437580 4. PHPUnit_TextUI_TestRunner->doRun() /usr/local/zend/share/pear/PHPUnit/TextUI/Command.php:188
0.5285 14749964 5. PHPUnit_Framework_TestSuite->run() /usr/local/zend/share/pear/PHPUnit/TextUI/TestRunner.php:320
28.1613 35231016 6. PHPUnit_Framework_TestSuite->run() /usr/local/zend/share/pear/PHPUnit/Framework/TestSuite.php:705
31.5796 35650708 7. PHPUnit_Framework_TestSuite->runTest() /usr/local/zend/share/pear/PHPUnit/Framework/TestSuite.php:745
31.5796 35650708 8. PHPUnit_Extensions_SeleniumTestCase->run() /usr/local/zend/share/pear/PHPUnit/Framework/TestSuite.php:772
31.5796 35650736 9. PHPUnit_Framework_TestResult->run() /usr/local/zend/share/pear/PHPUnit/Extensions/SeleniumTestCase.php:527
31.5797 35651320 10. PHPUnit_Framework_TestCase->runBare() /usr/local/zend/share/pear/PHPUnit/Framework/TestResult.php:649
65.0235 36041948 11. PHPUnit_Extensions_SeleniumTestCase->onNotSuccessfulTest() /usr/local/zend/share/pear/PHPUnit/Framework/TestCase.php:888

$ phpunit --version
PHPUnit 3.6.2 by Sebastian Bergmann

$ php --version
PHP 5.3.8-ZS5.5.0 (cli) (built: Aug 24 2011 11:03:29)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans
with Zend Extension Manager v5.1, Copyright (c) 2003-2010, by Zend Technologies
- with Zend Data Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
- with Zend Utils v1.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
- with Zend Optimizer+ v4.1, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [disabled]