From 9d49b7b6260ba8128bd2fd7097c029c47587eb90 Mon Sep 17 00:00:00 2001 From: Benjamin Ellis Date: Thu, 21 Dec 2023 11:08:26 +0100 Subject: [PATCH 1/2] fix(json): Call to a member function getValue() on null in JsonContext::getJson --- src/HttpCall/HttpCallListener.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/HttpCall/HttpCallListener.php b/src/HttpCall/HttpCallListener.php index 1c7aea5a..aa293ab9 100644 --- a/src/HttpCall/HttpCallListener.php +++ b/src/HttpCall/HttpCallListener.php @@ -48,11 +48,6 @@ public function afterStep(AfterStepTested $event) return true; } - // Session can be stopped. Ex: using SystemContext - if (!$this->mink->getSession()->isStarted()) { - return; - } - // For now to avoid modification on MinkContext // We add fallback on Mink try { From 489aa855f0d30140c0fc198d5dc8bfeb995ff4c0 Mon Sep 17 00:00:00 2001 From: "hubert.lenoir" Date: Fri, 12 Jan 2024 10:51:15 +0100 Subject: [PATCH 2/2] fix NoSuchDriver exception hanlding --- src/HttpCall/HttpCallListener.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/HttpCall/HttpCallListener.php b/src/HttpCall/HttpCallListener.php index aa293ab9..577914ef 100644 --- a/src/HttpCall/HttpCallListener.php +++ b/src/HttpCall/HttpCallListener.php @@ -58,6 +58,8 @@ public function afterStep(AfterStepTested $event) // Mink has no response } catch (\Behat\Mink\Exception\DriverException $e) { // No Mink + } catch (\WebDriver\Exception\NoSuchDriver $e) { + // A session is either terminated or not started } } }