Skip to content

Commit 0a05249

Browse files
committed
Fixed monolog warning method usage in PHPUnit tests
1 parent e08eb9f commit 0a05249

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Magento/FunctionalTestingFramework/Config/Reader/Filesystem.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ protected function verifyFileEmpty($content, $fileName)
210210
{
211211
if (empty($content)) {
212212
if (MftfApplicationConfig::getConfig()->verboseEnabled()) {
213-
LoggingUtil::getInstance()->getLogger(Filesystem::class)->warn(
213+
LoggingUtil::getInstance()->getLogger(Filesystem::class)->warning(
214214
"XML File is empty.",
215215
["File" => $fileName]
216216
);

src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/PersistedObjectHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function retrieveEntityField($stepKey, $field, $scope)
193193
$warnMsg = "Undefined field {$field} in entity object with a stepKey of {$stepKey}\n";
194194
$warnMsg .= "Please fix the invalid reference. This will result in fatal error in next major release.";
195195
//TODO: change this to throw an exception in next major release
196-
LoggingUtil::getInstance()->getLogger(PersistedObjectHandler::class)->warn($warnMsg);
196+
LoggingUtil::getInstance()->getLogger(PersistedObjectHandler::class)->warning($warnMsg);
197197
if (MftfApplicationConfig::getConfig()->verboseEnabled()
198198
&& MftfApplicationConfig::getConfig()->getPhase() !== MftfApplicationConfig::UNIT_TEST_PHASE) {
199199
print("\n$warnMsg\n");

src/Magento/FunctionalTestingFramework/Test/Util/ActionObjectExtractor.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ private function auditMergeSteps($stepKeyRefs, $testName)
305305
});
306306

307307
foreach ($atRiskStepRef as $stepKey => $stepRefs) {
308-
LoggingUtil::getInstance()->getLogger(ActionObjectExtractor::class)->warn(
308+
LoggingUtil::getInstance()->getLogger(ActionObjectExtractor::class)->warning(
309309
'multiple actions referencing step key',
310310
['test' => $testName, 'stepKey' => $stepKey, 'ref' => $stepRefs]
311311
);

src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ private function setArrayValueWithLogging($inArray, $index, $value)
585585
} else {
586586
$warnMsg = 'Path: ' . $value . ' is ignored by ModuleResolver. ' . PHP_EOL . 'Path: ';
587587
$warnMsg .= $inArray[$index] . ' is set for Module: ' . $index . PHP_EOL;
588-
LoggingUtil::getInstance()->getLogger(ModuleResolver::class)->warn($warnMsg);
588+
LoggingUtil::getInstance()->getLogger(ModuleResolver::class)->warning($warnMsg);
589589
}
590590
return $outArray;
591591
}

0 commit comments

Comments
 (0)