Skip to content

Commit 842f9f5

Browse files
committed
33293: Fixed static-test
1 parent 45e2436 commit 842f9f5

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

dev/tests/unit/Magento/FunctionalTestFramework/DataGenerator/Handlers/PersistedObjectHandlerTest.php

+6-10
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,8 @@ public function mockCurlHandler(string $response, array $parserOutput): void
538538
$dataObjectHandler->setAccessible(true);
539539
$dataObjectHandler->setValue(null);
540540

541-
$mockDataProfileSchemaParser = $this->createMock(DataProfileSchemaParser::class);
542-
$mockDataProfileSchemaParser
541+
$dataProfileSchemaParser = $this->createMock(DataProfileSchemaParser::class);
542+
$dataProfileSchemaParser
543543
->method('readDataProfiles')
544544
->willReturn($parserOutput);
545545

@@ -554,26 +554,22 @@ public function mockCurlHandler(string $response, array $parserOutput): void
554554
->method('isContentTypeJson')
555555
->willReturn(true);
556556

557-
$objectManagerInstance = ObjectManagerFactory::getObjectManager();
557+
$objectManager = ObjectManagerFactory::getObjectManager();
558558
$objectManagerMockInstance = $this->createMock(ObjectManager::class);
559559
$objectManagerMockInstance->expects($this->any())
560560
->method('create')
561561
->will(
562562
$this->returnCallback(
563-
function (
564-
string $class,
565-
array $arguments = []
566-
) use ($curlHandler, $objectManagerInstance, $mockDataProfileSchemaParser)
567-
{
563+
function ($class, $arguments = []) use ($curlHandler, $objectManager, $dataProfileSchemaParser) {
568564
if ($class === CurlHandler::class) {
569565
return $curlHandler;
570566
}
571567

572568
if ($class === DataProfileSchemaParser::class) {
573-
return $mockDataProfileSchemaParser;
569+
return $dataProfileSchemaParser;
574570
}
575571

576-
return $objectManagerInstance->create($class, $arguments);
572+
return $objectManager->create($class, $arguments);
577573
}
578574
)
579575
);

0 commit comments

Comments
 (0)