Skip to content

Commit

Permalink
Merge branch '9.0' into feature/3732-cr-privileges-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
bwaidelich committed Nov 13, 2024
2 parents 08cf7fe + 6ec3aa8 commit 7309c97
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ public function theLastCommandShouldHaveThrown(string $shortExceptionName, ?int
$this->lastCommandException->getMessage()
));
}
$this->lastCommandException = null;
}

/**
Expand All @@ -343,6 +344,23 @@ public function theLastCommandShouldHaveThrownTheWorkspaceRebaseFailedWith(Table
}

Assert::assertSame($payloadTable->getHash(), $actualComparableHash);
$this->lastCommandException = null;
}

/**
* @AfterScenario
*/
public function ensureNoUnhandledCommandExceptions(\Behat\Behat\Hook\Scope\AfterScenarioScope $event): void
{
if ($this->lastCommandException !== null) {
Assert::fail(sprintf(
'Last command did throw with exception which was not asserted: %s: "%s" in %s:%s',
$this->lastCommandException::class,
$this->lastCommandException->getMessage(),
$event->getFeature()->getFile(),
$event->getScenario()->getLine(),
));
}
}

/**
Expand Down

0 comments on commit 7309c97

Please sign in to comment.