29 $this->_helper->addHandler(
'method',
'handler');
30 $this->assertEquals([], $this->_helper->getHandlers(
'method'));
33 $objectOne = new \StdClass();
34 $this->_helper->addHandler(
'valid', $objectOne);
35 $this->assertSame([$objectOne], $this->_helper->getHandlers(
'valid'));
38 $objectTwo = new \StdClass();
39 $this->_helper->addHandler(
'valid', $objectTwo);
40 $this->assertSame([$objectOne, $objectTwo], $this->_helper->getHandlers(
'valid'));
45 $this->_helper->addHandler(
'sampleProcessor', $this);
46 $this->assertStringStartsWith(__CLASS__, $this->_helper->process(
'sampleProcessor', uniqid(), []));
54 "<p>line1</p><br />\nline2" 63 "<p>line1</p>\nline2" 72 $this->assertEquals($expectedResult, $this->_helper->isDirectivesExists($html));
79 [
'Test string',
false],
80 [
'{store url="customer/account/login"}',
false],
81 [
'{{store url="customer/account/login"}}',
true],
98 return __CLASS__ . $string;
111 $attributeName =
'description';
113 \
Magento\Eav\Model\Config::class
118 $isHtml =
$attribute->getIsHtmlAllowedOnFront();
119 $isWysiwyg =
$attribute->getIsWysiwygEnabled();
120 $attribute->setIsHtmlAllowedOnFront(0)->setIsWysiwygEnabled(0);
125 $this->_helper->{
$method}(uniqid(),
"<p>line1</p>\nline2", $attributeName)
128 $attribute->setIsHtmlAllowedOnFront($isHtml)->setIsWysiwygEnabled($isWysiwyg);
129 }
catch (\Exception $e) {
130 $attribute->setIsHtmlAllowedOnFront($isHtml)->setIsWysiwygEnabled($isWysiwyg);
isDirectiveDataProvider()
sampleProcessor(\Magento\Catalog\Helper\Output $helper, $string, $params)
testIsDirective($html, $expectedResult)
_testAttribute($method, $entityCode, $expectedResult)
testAddHandlerGetHandlers()
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
static getObjectManager()