From 348bd4b923f31cfddfc90a60f2a432e36bc0300d Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Wed, 9 Nov 2022 20:31:35 +0000 Subject: [PATCH] feat: improves feedback when test misses description --- src/Exceptions/TestDescriptionMissing.php | 24 +++++++++++++++++++++++ src/Factories/TestCaseFactory.php | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/Exceptions/TestDescriptionMissing.php diff --git a/src/Exceptions/TestDescriptionMissing.php b/src/Exceptions/TestDescriptionMissing.php new file mode 100644 index 00000000..67f75930 --- /dev/null +++ b/src/Exceptions/TestDescriptionMissing.php @@ -0,0 +1,24 @@ +description === null) { - throw ShouldNotHappen::fromMessage('The test description may not be empty.'); + throw new TestDescriptionMissing($method->filename); } if (array_key_exists($method->description, $this->methods)) {