Skip to content

Commit 2fd0f9d

Browse files
committed
Fixed failed Integration Tests
- `lib/internal/Magento/Framework/View/FileSystem.php:174` explode(): Passing null to parameter #2 ($string) of type string is deprecated
1 parent 9b1016b commit 2fd0f9d

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

dev/tests/integration/testsuite/Magento/Framework/View/Element/TemplateTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public function testGetObjectData()
116116

117117
public function testGetCacheKeyInfo()
118118
{
119+
$this->_block->setTemplate($this->_block->getTemplate() ?? '');
119120
$this->assertArrayHasKey('template', $this->_block->getCacheKeyInfo());
120121
}
121122
}

dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Payment/MethodsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public function testPaymentMethod($code, $methodClass)
7171
/** @var $block \Magento\Framework\View\Element\Template */
7272
$block = $blockFactory->createBlock($blockClass);
7373
$block->setArea('frontend');
74+
$block->setTemplate($block->getTemplate() ?? '');
7475
$this->assertFileExists((string)$block->getTemplateFile(), $message);
7576
if ($model->canUseInternal()) {
7677
try {
@@ -80,6 +81,7 @@ public function testPaymentMethod($code, $methodClass)
8081
\Magento\Store\Model\Store::DEFAULT_STORE_ID
8182
);
8283
$block->setArea('adminhtml');
84+
$block->setTemplate($block->getTemplate() ?? '');
8385
$this->assertFileExists((string)$block->getTemplateFile(), $message);
8486
Bootstrap::getObjectManager()->get(
8587
\Magento\Store\Model\StoreManagerInterface::class

dev/tests/integration/testsuite/Magento/Theme/Block/Html/FooterTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ public function testGetCacheKeyInfo()
3030
$context = $objectManager->get(\Magento\Framework\App\Http\Context::class);
3131
$context->setValue(Context::CONTEXT_AUTH, false, false);
3232
$block = $objectManager->get(\Magento\Framework\View\LayoutInterface::class)
33-
->createBlock(\Magento\Theme\Block\Html\Footer::class);
33+
->createBlock(\Magento\Theme\Block\Html\Footer::class)
34+
->setTemplate('');
3435
$storeId = $objectManager->get(\Magento\Store\Model\StoreManagerInterface::class)->getStore()->getId();
3536
$this->assertEquals(
3637
['PAGE_FOOTER', $storeId, 0, $this->_theme->getId(), false, $block->getTemplateFile(), 'template' => null],

0 commit comments

Comments
 (0)