Skip to content

Commit 72e69a0

Browse files
committed
MQE-1870: AllureHelper exception in suites
- AllureHelper checks storage before firing off event - Small bugfix to static-checks
1 parent f96bbf5 commit 72e69a0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Magento/FunctionalTestingFramework/Allure/AllureHelper.php

+5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ public static function addAttachmentToLastStep($data, $caption)
3434
$rootStep = Allure::lifecycle()->getStepStorage()->getLast();
3535
$trueLastStep = array_last($rootStep->getSteps());
3636

37+
if ($trueLastStep == null) {
38+
// Nothing to attach to; do not fire off allure event
39+
return;
40+
}
41+
3742
$attachmentEvent = new AddAttachmentEvent($data, $caption);
3843
$attachmentEvent->process($trueLastStep);
3944
}

src/Magento/FunctionalTestingFramework/StaticCheck/TestDependencyCheck.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class TestDependencyCheck implements StaticCheckInterface
6666
* Array containing all errors found after running the execute() function.
6767
* @var array
6868
*/
69-
private $errors;
69+
private $errors = [];
7070

7171
/**
7272
* String representing the output summary found after running the execute() function.

0 commit comments

Comments
 (0)