public function setUp() { parent::setUp(); $helperMock = $this->getHelperMock('ops/payment', array('shaCryptValidation', 'cancelOrder', 'declineOrder', 'handleException', 'getSHAInSet', 'refillCart')); $helperMock->expects($this->any())->method('shaCryptValidation')->will($this->returnValue(true)); $this->replaceByMock('helper', 'ops/payment', $helperMock); }
public function setUp() { Mage::setIsDeveloperMode(false); Mage::getConfig()->setNode('default/dev/log/file', 'phpunit.system.log'); $this->mockAdminUserSession(); parent::setUp(); }
public function setUp() { parent::setUp(); $nodePath = "modules/Enterprise_AdminGws/active"; if (Mage::helper('core/data')->isModuleEnabled('Enterprise_AdminGws')) { Mage::getConfig()->setNode($nodePath, 'false', true); } }
/** * Set up test class */ protected function setUp() { parent::setUp(); /* @var $history FireGento_AdminMonitoring_Model_History */ $history = Mage::getModel('firegento_adminmonitoring/history'); Mage::register('current_history', $history, true); $this->_block = self::app()->getLayout()->createBlock('firegento_adminmonitoring/adminhtml_history_view'); }
/** * Add color attribute to default attribute set and create option */ protected function setUp() { parent::setUp(); $setup = new Mage_Catalog_Model_Resource_Setup('catalog_setup'); $colorAttributeId = $setup->getAttributeId(Mage_Catalog_Model_Product::ENTITY, 'color'); $setup->addAttributeToSet(Mage_Catalog_Model_Product::ENTITY, self::DEFAULT_ATTRIBUTE_SET, self::GENERAL_ATTRIBUTE_GROUP, $colorAttributeId); $setup->addAttributeOption(array('attribute_id' => $colorAttributeId, 'values' => ['Octarin'])); $this->optionId = $setup->getConnection()->lastInsertId($setup->getTable('eav/attribute_option')); }
protected function setUp() { $this->getLayout()->reset(); // Make sure the 'price' attribute is set to is_filterable_in_search $price = $this->getPriceAttribute(); $price->setData('is_filterable_in_search', 1); $price->save(); parent::setUp(); }
/** * Set up the test class */ protected function setUp() { parent::setUp(); $this->_block = self::app()->getLayout()->createBlock('debit/form'); // Set object data $method = Mage::getModel('debit/debit'); $infoInstance = Mage::getModel('payment/info'); $infoInstance->setMethod($method->getCode()); $infoInstance->setMethodInstance($method); $method->setData('info_instance', $infoInstance); $this->_block->setData('method', $method); }
public function setUp() { parent::setUp(); $fakeUser = $this->getModelMock('admin/user', array('getId', 'getRole')); $fakeUser->expects($this->any())->method('getId')->will($this->returnValue(1)); $sessionMock = $this->getModelMock('admin/session', array('getUser', 'init', 'save')); $sessionMock->expects($this->any())->method('getUser')->will($this->returnValue($fakeUser)); $this->replaceByMock('model', 'admin/session', $sessionMock); $nodePath = "modules/Enterprise_AdminGws/active"; if (Mage::helper('core/data')->isModuleEnabled('Enterprise_AdminGws')) { Mage::getConfig()->setNode($nodePath, 'false', true); } }
/** * Set up the test class */ protected function setUp() { parent::setUp(); $this->_block = self::app()->getLayout()->createBlock('debit/info'); // Payment Data $paymentData = array('debit_cc_type' => 21050170, 'debit_cc_owner' => 'Test Tester', 'debit_cc_number' => 12345678, 'debit_swift' => 'BELADEBEXXX', 'debit_iban' => 'DE68210501700012345678', 'debit_bankname' => 'Test Bank'); // Set object data $method = Mage::getModel('debit/debit'); $infoInstance = Mage::getModel('payment/info'); $infoInstance->setMethod($method->getCode()); $infoInstance->setMethodInstance($method); $method->setData('info_instance', $infoInstance); $method->assignData($paymentData); $this->_block->setData('method', $method); $this->_block->setData('info', $infoInstance); }
protected function setUp() { parent::setUp(); $this->_fpc = Mage::getSingleton('fpc/fpc'); $this->_fpc->clean(); // disable all caches expected fpc $this->_cache = Mage::app()->getCacheInstance(); $this->_cacheOptions = Mage::getResourceSingleton('core/cache')->getAllOptions(); $cacheOptions = $this->_cacheOptions; foreach (array_keys($cacheOptions) as $cache) { $cacheOptions[$cache] = $cache == 'fpc' ? 1 : 0; } if (!array_key_exists('fpc', $cacheOptions)) { $cacheOptions['fpc'] = 1; } $this->_cache->saveOptions($cacheOptions); $cacheReflector = new ReflectionClass('Mage_Core_Model_Cache'); $initOptionsMethod = $cacheReflector->getMethod('_initOptions'); $initOptionsMethod->setAccessible(true); $initOptionsMethod->invokeArgs($this->_cache, array()); }
/** * Mock the admin session and the adminhtml notifications */ protected function setUp() { parent::setUp(); $this->mockAdminSession(); $this->disableAdminNotifications(); }
public function setUp() { //AW_Productquestions_Test_Mocks_Foreignresetter::dropForeignKeys(); parent::setUp(); }
protected function setUp() { parent::setUp(); $this->_helper = Mage::helper('fpc'); }
/** * Sets everything for a new test. parent::setUp() is necessary to enable fixtures. */ public function setUp() { parent::setUp(); }
/** * Set up test class */ protected function setUp() { parent::setUp(); $this->_block = self::app()->getLayout()->createBlock('debit/mandate'); }
/** * Set up test class */ protected function setUp() { parent::setUp(); $this->_model = Mage::getModel('firegento_adminmonitoring/observer_log'); }
public function setUp() { parent::setUp(); $this->model = Mage::getModel('ops/payment_abstract'); }
/** * Set up test class */ protected function setUp() { parent::setUp(); $this->_model = Mage::getModel('debit/validation'); }
/** * Set up the test class */ protected function setUp() { parent::setUp(); $this->_block = self::app()->getLayout()->createBlock('debit/adminhtml_order'); }
/** * Set up test class */ protected function setUp() { parent::setUp(); $this->_helper = Mage::helper('debit/adminhtml'); }
/** * Set up test class */ protected function setUp() { parent::setUp(); $this->_model = Mage::getModel('firegento_adminmonitoring/rowUrl_model_order'); }
public function setUp() { parent::setUp(); $this->createAdminSession(); }