-
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
annotation @depends does not work #82
Comments
I've integrated your test and replicated the bug. The problem is the suite creation code is a mess, because it overrides the standard one to provide support for multiple browsers and Selenese tests; it will take a while to refactor it. |
Could you please define when will exactly this bug be fixed? This action is very important for my project. Thank you in advance. |
This bug is now fixed in master. If you want it fixed before the next minor release, patch your PHPUnit_Extensions_SeleniumTestCase.php file. |
After applying these changes annotation @Depends began working, but the whole work still has bugs: TEST: class dependsTest extends PHPUnit_Extensions_SeleniumTestCase
} RESULT: ..NULL Time: 29 seconds, Memory: 5.75Mb OK (2 tests, 0 assertions) |
After delegating a bit more to PHPUnit_Framework_TestCase, the test now passes (using assertSame instead of assertEquals to check the string is passed between tests.) If you find other failures of @Depends, please report them and reopen the issue. |
Can you fix this also in the Selenium2TestCase ? |
I wasn't aware it was not working in there, thanks for reporting. |
if extends test class from PHPUnit/Extensions/SeleniumTestCase annotation @Depends does not work
test example:
class test extends PHPUnit_Extensions_SeleniumTestCase
{
}
result:
PHPUnit 3.6.7 by Sebastian Bergmann.
PHPUnit_Framework_Error_Warning : Missing argument 2 for PHPUnit_Framework_Error::__construct(), called in home\PEAR\PHPUnit\Extensions\SeleniumTestCase.php on line 1110 and defined
#0 home\PEAR\PHPUnit\Framework\Error.php(69): PHPUnit_Util_ErrorHandler::handleError(2, 'Missing argumen...', 'C:\wamp\bin\php...', 69, Array)
#1 home\PEAR\PHPUnit\Extensions\SeleniumTestCase.php(1110): PHPUnit_Framework_Error->__construct('Current URL: ht...')
#2 home\PEAR\PHPUnit\Framework\TestCase.php(910): PHPUnit_Extensions_SeleniumTestCase->onNotSuccessfulTest(Object(PHPUnit_Framework_Error_Warning))
#3 home\PEAR\PHPUnit\Framework\TestResult.php(649): PHPUnit_Framework_TestCase->runBare()
#4 home\PEAR\PHPUnit\Extensions\SeleniumTestCase.php(561): PHPUnit_Framework_TestResult->run(Object(test))
#5 home\PEAR\PHPUnit\Framework\TestSuite.php(772): PHPUnit_Extensions_SeleniumTestCase->run(Object(PHPUnit_Framework_TestResult))
#6 home\PEAR\PHPUnit\Framework\TestSuite.php(745): PHPUnit_Framework_TestSuite->runTest(Object(test), Object(PHPUnit_Framework_TestResult))
#7 home\PEAR\PHPUnit\TextUI\TestRunner.php(325): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
#8 home\PEAR\PHPUnit\TextUI\Command.php(187): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#9 home\ide-phpunit.php(194): PHPUnit_TextUI_Command->run(Array, true)
#10 home\ide-phpunit.php(386): IDE_PHPUnit_TextUI_Command::main()
#11 {main}
Time: 31 seconds, Memory: 5.75Mb
FAILURES!
Tests: 2, Assertions: 0, Errors: 1.
Process finished with exit code 2
The text was updated successfully, but these errors were encountered: