Skip to content

Commit 9435361

Browse files
committed
Merge pull request #226 from minkphp/safeguard
Add safeguard for not found elements in the driver-specific tests
2 parents a67b841 + 0429fcf commit 9435361

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/Custom/TimeoutTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ class TimeoutTest extends TestCase
1111
*/
1212
public function testInvalidTimeoutSettingThrowsException()
1313
{
14-
$this->getSession()->getDriver()->setTimeouts(array('invalid'=>0));
14+
$this->getSession()->getDriver()->setTimeouts(array('invalid' => 0));
1515
}
1616

1717
public function testShortTimeoutDoesNotWaitForElementToAppear()
1818
{
19-
$this->getSession()->getDriver()->setTimeouts(array('implicit'=>0));
19+
$this->getSession()->getDriver()->setTimeouts(array('implicit' => 0));
2020

2121
$this->getSession()->visit($this->pathTo('/js_test.html'));
22-
$this->getSession()->getPage()->findById('waitable')->click();
22+
$this->findById('waitable')->click();
2323

2424
$element = $this->getSession()->getPage()->find('css', '#waitable > div');
2525

@@ -28,10 +28,10 @@ public function testShortTimeoutDoesNotWaitForElementToAppear()
2828

2929
public function testLongTimeoutWaitsForElementToAppear()
3030
{
31-
$this->getSession()->getDriver()->setTimeouts(array('implicit'=>5000));
31+
$this->getSession()->getDriver()->setTimeouts(array('implicit' => 5000));
3232

3333
$this->getSession()->visit($this->pathTo('/js_test.html'));
34-
$this->getSession()->getPage()->findById('waitable')->click();
34+
$this->findById('waitable')->click();
3535
$element = $this->getSession()->getPage()->find('css', '#waitable > div');
3636

3737
$this->assertNotNull($element);

0 commit comments

Comments
 (0)