Example #1
0
 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'));
 }
 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);
 }
Example #3
0
 * 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);