From fe2e6dd61fed6ae5074474f98b0bea0cddf9614a Mon Sep 17 00:00:00 2001 From: Samuel ROZE Date: Thu, 22 Jun 2017 10:49:55 +0100 Subject: [PATCH] Throw an exception instead of using `assert` --- .../2.1/features/bootstrap/FeatureContext.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/behat/symfony2-extension/2.1/features/bootstrap/FeatureContext.php b/behat/symfony2-extension/2.1/features/bootstrap/FeatureContext.php index 23e3386a..bfb1459a 100644 --- a/behat/symfony2-extension/2.1/features/bootstrap/FeatureContext.php +++ b/behat/symfony2-extension/2.1/features/bootstrap/FeatureContext.php @@ -41,6 +41,8 @@ class FeatureContext implements Context */ public function theResponseShouldBeReceived() { - assert($this->response !== null); + if ($this->response === null) { + throw new \RuntimeException('No response received'); + } } }