Skip to content

Commit

Permalink
fix: session might be close on httpcalllistener
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Jul 5, 2023
1 parent ae6e45f commit 202c7c4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/HttpCall/HttpCallListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ public function afterStep(AfterStepTested $event)
// For now to avoid modification on MinkContext
// We add fallback on Mink
try {
if ($this->mink->getSession()->isStarted()) {
$this->httpCallResultPool->store(
new HttpCallResult($this->mink->getSession()->getPage()->getContent())
);
}
$this->httpCallResultPool->store(
new HttpCallResult($this->mink->getSession()->getPage()->getContent())
);
} catch (\LogicException $e) {
// Mink has no response
} catch (\Behat\Mink\Exception\DriverException $e) {
Expand Down

0 comments on commit 202c7c4

Please sign in to comment.