diff --git a/CHANGELOG.md b/CHANGELOG.md index 84cc2cfad..fd1e02008 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ Magento Functional Testing Framework Changelog ================================================ +2.5.3 +----- + +### Fixes +* Fixed an issue where `createData` actions would cause an exception when used in `` hooks. + 2.5.2 ----- diff --git a/bin/mftf b/bin/mftf index 355a851c8..9e5879280 100755 --- a/bin/mftf +++ b/bin/mftf @@ -29,7 +29,7 @@ try { try { $application = new Symfony\Component\Console\Application(); $application->setName('Magento Functional Testing Framework CLI'); - $application->setVersion('2.5.2'); + $application->setVersion('2.5.3'); /** @var \Magento\FunctionalTestingFramework\Console\CommandListInterface $commandList */ $commandList = new \Magento\FunctionalTestingFramework\Console\CommandList; foreach ($commandList->getCommands() as $command) { diff --git a/composer.json b/composer.json index bc2592d97..f4d192b8d 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magento/magento2-functional-testing-framework", "description": "Magento2 Functional Testing Framework", "type": "library", - "version": "2.5.2", + "version": "2.5.3", "license": "AGPL-3.0", "keywords": ["magento", "automation", "functional", "testing"], "config": { diff --git a/composer.lock b/composer.lock index 2439f83ef..34ea00854 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5d566c152481274493082bdabb128c70", + "content-hash": "43ac7d340b672794730bbbe4b47894e0", "packages": [ { "name": "allure-framework/allure-codeception", diff --git a/src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php b/src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php index d8f1c63d8..0fde0e8e7 100644 --- a/src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php +++ b/src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php @@ -34,6 +34,11 @@ public static function addAttachmentToLastStep($data, $caption) $rootStep = Allure::lifecycle()->getStepStorage()->getLast(); $trueLastStep = array_last($rootStep->getSteps()); + if ($trueLastStep == null) { + // Nothing to attach to; do not fire off allure event + return; + } + $attachmentEvent = new AddAttachmentEvent($data, $caption); $attachmentEvent->process($trueLastStep); } diff --git a/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php b/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php index 6cfa4e9a8..19725dc18 100644 --- a/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php +++ b/src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php @@ -66,7 +66,7 @@ class TestDependencyCheck implements StaticCheckInterface * Array containing all errors found after running the execute() function. * @var array */ - private $errors; + private $errors = []; /** * String representing the output summary found after running the execute() function.