-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Throw explanative LogicException
when driver is not started yet
#268
Conversation
a1b01a6
to
faab6ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but we need to fix the tests before merging (in another PR).
tests/ClientTest.php
Outdated
@@ -17,7 +17,8 @@ | |||
use Facebook\WebDriver\JavaScriptExecutor; | |||
use Facebook\WebDriver\WebDriver; | |||
use Facebook\WebDriver\WebDriverExpectedCondition; | |||
use Symfony\Component\BrowserKit\Client as BrowserKitClient; | |||
use LogicException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use \LogicException
instead of this in Symfony.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As in, you mean not importing the exception class? Ok, did change that in ea9d7d1.
f3f18ee
to
ea9d7d1
Compare
This PR actually fixes CI for PHP 7.2 , which is failing on @dunglas would you be ok with me adding PHPStan in a separate PR and run it via Github Actions? See php-translation/symfony-storage#38 and theiconic/name-parser#41 and rvanlaak/SettingsBundle#110 as examples 👍 |
When
executeScript
gets called before the client made a request, an exception should get thrown. The problem; the actualRuntimeException
can not get created because driver isnull
.This PR clarifies that these methods can not get called before the driver is started.
Failing test on linting / phpstan does not seem related (?). Is it because of the 0.12 phpstan release of several days ago?