From 5e997e6db1f288fabdb006e8acf6731b7823c11c Mon Sep 17 00:00:00 2001 From: monotonesol Date: Fri, 31 Jan 2020 16:27:48 +0200 Subject: [PATCH 1/2] update composer.json to be able to install with codeception 4.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d4ef8bb..1241d4b 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ }, "require": { "php": ">=5.4.0", - "codeception/codeception": "^2.3|^3.0", + "codeception/codeception": "^2.3|^3.0|^4.0", "allure-framework/allure-php-api": "~1.1.0", "symfony/filesystem": ">=2.6", "symfony/finder": ">=2.6" From c8166e212df16f337873b8e748c3c8a4a661e7cb Mon Sep 17 00:00:00 2001 From: monotonesol Date: Fri, 31 Jan 2020 18:42:50 +0200 Subject: [PATCH 2/2] Check if test is codeception test --- src/Yandex/Allure/Codeception/AllureCodeception.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yandex/Allure/Codeception/AllureCodeception.php b/src/Yandex/Allure/Codeception/AllureCodeception.php index 51a23a2..166824f 100644 --- a/src/Yandex/Allure/Codeception/AllureCodeception.php +++ b/src/Yandex/Allure/Codeception/AllureCodeception.php @@ -382,7 +382,7 @@ public function testSkipped(FailEvent $failEvent) public function testEnd(TestEvent $testEvent) { // attachments supported since Codeception 3.0 - if (version_compare(Codecept::VERSION, '3.0.0') > -1) { + if (version_compare(Codecept::VERSION, '3.0.0') > -1 && $testEvent->getTest() instanceof Cest) { $artifacts = $testEvent->getTest()->getMetadata()->getReports(); $testCaseStorage = $this->getLifecycle()->getTestCaseStorage()->get(); foreach ($artifacts as $name => $artifact) {