本文整理汇总了PHP中Mage::setAllowDispatchEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage::setAllowDispatchEvent方法的具体用法?PHP Mage::setAllowDispatchEvent怎么用?PHP Mage::setAllowDispatchEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage
的用法示例。
在下文中一共展示了Mage::setAllowDispatchEvent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testProcessLater
public function testProcessLater()
{
Mage::setAllowDispatchEvent(true);
$responseMessage = Mage::getModel('xcom_xfabric/message_response')->setDirection(Xcom_Xfabric_Model_Message::DIRECTION_INBOUND)->setStatus(Xcom_Xfabric_Model_Message::MESSAGE_STATUS_RECEIVED)->setBody(array())->addData(array())->setTopic('message/ping')->setHeaders(array())->save();
Mage::getModel('xcom_xfabric/observer')->proceedDelayedProcess();
$this->assertEventCalledTimes('response_message_process_postponed_message_ping', 1);
$this->assertEquals('response_message_process_postponed_message_ping', Mage::registry('observer_called'));
}
示例2: __construct
public function __construct($name = NULL, array $data = array(), $dataName = '')
{
parent::__construct($name, $data, $dataName);
$this->_integrationHttpEndpoint = Mage::getBaseUrl() . '/tests/integration/index.php';
Mage::setAllowDispatchEvent(true);
}
示例3: ini_set
* NOTICE OF LICENSE
*
* This source file is subject to the Magento Enterprise Edition License
* that is bundled with this package in the file LICENSE_EE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.magentocommerce.com/license/enterprise-edition
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Integration tests
* @package Mage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://www.magentocommerce.com/license/enterprise-edition
*/
ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
define('INTEGRATION_TEST_FLAG', true);
require_once dirname(dirname(__FILE__)) . '/framework/bootstrap.php';
Mage::setIsDeveloperMode(true);
Mage::setAllowDispatchEvent(true);
umask(0);
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';
Mage::run($mageRunCode, $mageRunType);