public function testIsHighlightingDisabled() { $block = new Mage_DesignEditor_Block_Template(); $this->assertFalse($block->isHighlightingDisabled()); Mage::getSingleton('Mage_Core_Model_Cookie')->set(Mage_DesignEditor_Model_Session::COOKIE_HIGHLIGHTING, 'off'); $this->assertTrue($block->isHighlightingDisabled()); Mage::getSingleton('Mage_Core_Model_Cookie')->set(Mage_DesignEditor_Model_Session::COOKIE_HIGHLIGHTING, 'on'); $this->assertFalse($block->isHighlightingDisabled()); }
/** * Wrap layout element * * @param string $elementContent * @param string $elementName * @param bool $isContainer * @param bool $canManipulate * @return string */ protected function _wrapElement($elementContent, $elementName, $isContainer = false, $canManipulate = false) { $elementId = 'vde_element_' . rtrim(strtr(base64_encode($elementName), '+/', '-_'), '='); $this->_wrapperBlock->setData(array('element_id' => $elementId, 'element_title' => $this->getElementProperty($elementName, 'label') ?: $elementName, 'element_html' => $elementContent, 'is_manipulation_allowed' => $canManipulate, 'is_container' => $isContainer, 'element_name' => $elementName)); return $this->_wrapperBlock->toHtml(); }