-
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
Remove use of TestListener #432
Comments
@thewunder - I will try and pick this up soon to get a 8.* release out too |
Is this just used in |
According to sebastianbergmann/phpunit#3388, "Use the |
This does not seem as simple as first thought, the hooks pass through the name of the Test, not the Test class itself, so calling Any suggestions? |
How was the ScreenshotListener used before? Maybe we can do it differently? |
So, |
Not being able to access the test seems to be a feature. Maybe we need to take a step back here. So what is the use case of that?
So. |
b) Maybe we need something like (please excuse the pseudo code) class ScreenShotOnErrorListener() implements TestHookOrSomething {
function construct($test) {
$test->attachListener($this);
$this->test = $test;
}
function onFailure(string $test_name_whatever) {
$this->test->currentScreenshot();
}
}
class SomeTest {
function onSetup() {
new ScreenShotOnErrorListener($this);
}
} |
b) makes me feel this is a design flaw that we can only access the selenium API from the |
To have asked the question:Is the
|
@joesaunderson How would that be used? |
Scratch that, it wouldn’t work at all. Struggling to work out how the existing listener can be used in the same way. What are your ideas @thewunder? |
Note, until we have that fixed, using the fork where I removed the version limitation works as long as this class discussed here isn't used. |
Does anyone have further ideas of how we can remove the use of the TestListener |
When bumping version from 4.x to 7.x that's an incompatible change, so we could just remove it? |
+1 for just removing it so we can get a PHPUnit 8 compatible version out the door. Worst case scenario, something similar can be added in an 8.x release. My use case for screenshots: when a browser test fails ( |
I don't see a way to keep this feature, and I'm OK with removing it. @pajon and I discussed wanting to get w3c mode working before we release 8.0 dev-master is compatible with 8.0 if you are feeling adventuresome. |
i tried compatibility with w3c, but it will need a huge amount of time and refactor whole library. php-webdriver w3c talk. If we want ensure backwards compatibility with current JsonWire protocol, we must add way to choose between webdriver protocols. For me is better release 8.0 version from master and add compatibility in future release (maybe 9.0) |
In PHPUnit 8, TestListener and TestListenerDefaultImplenentation are deprecated.
This is preventing PHPUnit_Selenium from supporting PHPUnit 8.*
The text was updated successfully, but these errors were encountered: