Skip to content

Commit c3f003e

Browse files
committed
MAGETWO-66064: Remove usages of unserialize in module Magento/Catalog
1 parent a57daf9 commit c3f003e

File tree

1 file changed

+21
-0
lines changed
  • dev/tests/integration/testsuite/Magento/Catalog/Block/Product

1 file changed

+21
-0
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Block/Product/NewTest.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,25 @@ public function testToHtml()
115115
$this->_block->getProductCollection()
116116
);
117117
}
118+
119+
/**
120+
* @covers \Magento\Catalog\Block\Product\Widget\NewWidget::getCacheKeyInfo
121+
*/
122+
public function testNewWidgetGetCacheKeyInfo()
123+
{
124+
$block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
125+
\Magento\Framework\View\LayoutInterface::class
126+
)->createBlock(
127+
\Magento\Catalog\Block\Product\Widget\NewWidget::class
128+
);
129+
130+
$requestParams = ['test' => 'data'];
131+
132+
$block->getRequest()->setParams($requestParams);
133+
134+
$info = $block->getCacheKeyInfo();
135+
136+
$this->assertEquals('CATALOG_PRODUCT_NEW', $info[0]);
137+
$this->assertEquals(json_encode($requestParams), $info[8]);
138+
}
118139
}

0 commit comments

Comments
 (0)