Skip to content

Commit 5fe5710

Browse files
committed
ACP2E-23: [Magento Cloud] Error message in PDP disappearing quickly - Code refactoring applied.
1 parent 5eba4d8 commit 5fe5710

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/code/Magento/Theme/CustomerData/Messages.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ public function __construct(
4848
) {
4949
$this->messageManager = $messageManager;
5050
$this->interpretationStrategy = $interpretationStrategy;
51-
$this->messageProvider = $messageProvider ?? ObjectManager::getInstance()->get(MessagesProviderInterface::class);
51+
$this->messageProvider = $messageProvider
52+
?? ObjectManager::getInstance()->get(MessagesProviderInterface::class);
5253
}
5354

5455
/**

app/code/Magento/Theme/Test/Unit/CustomerData/MessagesTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ protected function setUp(): void
4747
$this->messageInterpretationStrategy = $this->createMock(
4848
InterpretationStrategyInterface::class
4949
);
50-
$this->object = new Messages($this->messageManager, $this->messageInterpretationStrategy, $this->messageProvider);
50+
$this->object = new Messages(
51+
$this->messageManager,
52+
$this->messageInterpretationStrategy,
53+
$this->messageProvider
54+
);
5155
}
5256

5357
public function testGetSectionData()

0 commit comments

Comments
 (0)