diff --git a/tests/Custom/TimeoutTest.php b/tests/Custom/TimeoutTest.php index 0f11523..5aa11b7 100644 --- a/tests/Custom/TimeoutTest.php +++ b/tests/Custom/TimeoutTest.php @@ -72,10 +72,10 @@ public function testShortPageLoadTimeoutThrowsException(): void $driver = $session->getDriver(); \assert($driver instanceof WebdriverClassicDriver); - $driver->setTimeouts(array('page' => 1)); // Use 1ms timeout to avoid any successful page load. + $driver->setTimeouts(['page' => 500]); - $this->expectException('\Behat\Mink\Exception\DriverException'); + $this->expectException(DriverException::class); $this->expectExceptionMessage('Page failed to load: '); - $session->visit('https://www.webpagetest.org/'); // Use external URL, because it loads slower, then local. + $session->visit($this->pathTo('/page_load.php?sleep=2')); } }