diff --git a/composer.json b/composer.json index 6024d5d..a8c52ab 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "doctrine/annotations": "1.*" }, "require-dev": { - "phpunit/phpunit": "^7 | ^8 | ^9" + "phpunit/phpunit": "^7 | ^8.5.52 | ^9.6.33" }, "autoload": { "psr-0": { diff --git a/src/Yandex/Allure/Adapter/Model/TestSuite.php b/src/Yandex/Allure/Adapter/Model/TestSuite.php index 6100d14..7f7fbf5 100644 --- a/src/Yandex/Allure/Adapter/Model/TestSuite.php +++ b/src/Yandex/Allure/Adapter/Model/TestSuite.php @@ -210,7 +210,7 @@ public function setDescription(Description $description) */ public function addTestCase(TestCase $testCase) { - $this->testCases[$testCase->getName()] = $testCase; + $this->testCases[$testCase->getName() ?? ''] = $testCase; } /** @@ -220,7 +220,7 @@ public function addTestCase(TestCase $testCase) */ public function getTestCase($name) { - return $this->testCases[$name]; + return $this->testCases[$name ?? '']; } /**