File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
dev/tests/integration/testsuite/Magento/Catalog/Block/Product Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -115,4 +115,25 @@ public function testToHtml()
115
115
$ this ->_block ->getProductCollection ()
116
116
);
117
117
}
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
+ }
118
139
}
You can’t perform that action at this time.
0 commit comments