Skip to content

Commit 5f3a169

Browse files
committed
PHPUnit 10 minor fixes
1 parent 089a04d commit 5f3a169

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

dev/tests/integration/framework/Magento/TestFramework/Annotation/ConfigFixture.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,14 @@ protected function _restoreConfigData()
272272
*/
273273
public function startTest(TestCase $test)
274274
{
275-
$eventObj = Magento::getCurrentEventObject();
276-
$testData = $eventObj->test()->testData();
277-
if($testData->hasDataFromDataProvider()){
278-
$dataSetName = $testData->dataFromDataProvider()->dataSetName();
279-
$test->setData($dataSetName, ['']);
275+
if ($eventObj = Magento::getCurrentEventObject()) {
276+
$testData = $eventObj->test()->testData();
277+
278+
if ($testData->hasDataFromDataProvider()) {
279+
$dataFromDataProvider = $testData->dataFromDataProvider();
280+
$dataSetName = $dataFromDataProvider->dataSetName();
281+
$test->setData($dataSetName, ['']);
282+
}
280283
}
281284

282285
$this->_currentTest = $test;

0 commit comments

Comments
 (0)