From d9f59c1beb35e2c68a08ba4469257ff922931032 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 2 Nov 2024 20:59:56 +0200 Subject: [PATCH] Adjustments per review --- tests/Custom/TimeoutTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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')); } }