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);
 }
Exemple #2
0
 public function tearDown()
 {
     $adminSession = Mage::getSingleton('admin/session');
     $adminSession->unsetAll();
     $adminSession->getCookie()->delete($adminSession->getSessionName());
     parent::tearDown();
 }
 public function setUp()
 {
     Mage::setIsDeveloperMode(false);
     Mage::getConfig()->setNode('default/dev/log/file', 'phpunit.system.log');
     $this->mockAdminUserSession();
     parent::setUp();
 }
 /**
  * Returns cookies container,
  * that processes them
  *
  * @return Zend_Http_CookieJar
  */
 protected static function getCookies()
 {
     if (self::$_cookies === null) {
         self::$_cookies = new Zend_Http_CookieJar();
     }
     return self::$_cookies;
 }
 /**
  * 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');
 }
 public function setUp()
 {
     parent::setUp();
     $nodePath = "modules/Enterprise_AdminGws/active";
     if (Mage::helper('core/data')->isModuleEnabled('Enterprise_AdminGws')) {
         Mage::getConfig()->setNode($nodePath, 'false', true);
     }
 }
Exemple #7
0
 protected function tearDown()
 {
     parent::tearDown();
     $this->_cache->saveOptions($this->_cacheOptions);
     // unregister fpc
     Mage::unregister('_singleton/fpc/fpc');
     Mage::getSingleton('customer/session')->logout();
 }
 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);
     }
 }
Exemple #11
0
 /**
  * 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);
 }
 public function tearDown()
 {
     parent::tearDown();
     Mage::unregister('ops_auto_capture');
 }
 /**
  * Delete created color option
  */
 protected function tearDown()
 {
     $setup = new Mage_Catalog_Model_Resource_Setup('catalog_setup');
     Mage::getModel('eav/entity_attribute_option')->setId($this->optionId)->delete();
     parent::tearDown();
 }
 public function setUp()
 {
     parent::setup();
     $this->_model = Mage::getModel('ops/observer');
 }
 /**
  * Set up test class
  */
 protected function setUp()
 {
     parent::setUp();
     $this->_helper = Mage::helper('debit/adminhtml');
 }
Exemple #16
0
 public function setUp()
 {
     parent::setup();
     $this->helper = Mage::helper('ops');
     $this->store = Mage::app()->getStore(0)->load(0);
 }
 public function setup()
 {
     AW_Collpur_Test_Model_Mocks_Foreignresetter::dropForeignKeys();
     parent::setup();
 }
 /**
  * Set up test class
  */
 protected function setUp()
 {
     parent::setUp();
     $this->_model = Mage::getModel('debit/validation');
 }
 /**
  * Unset everything before the next test.
  */
 public function tearDown()
 {
     unset($this->object);
     parent::tearDown();
 }
Exemple #20
0
 public function setUp()
 {
     parent::setup();
     $this->_block = Mage::app()->getLayout()->getBlockSingleton('ops/form');
 }
 /**
  * Mock the admin session and the adminhtml notifications
  */
 protected function setUp()
 {
     parent::setUp();
     $this->mockAdminSession();
     $this->disableAdminNotifications();
 }
 /**
  * Set up test class
  */
 protected function setUp()
 {
     parent::setUp();
     $this->_block = self::app()->getLayout()->createBlock('debit/mandate');
 }
 protected function setUp()
 {
     parent::setUp();
     $this->_helper = Mage::helper('fpc');
 }
 public function setUp()
 {
     parent::setUp();
     $this->model = Mage::getModel('ops/payment_abstract');
 }
 public function setUp()
 {
     //AW_Productquestions_Test_Mocks_Foreignresetter::dropForeignKeys();
     parent::setUp();
 }
 /**
  * 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->_model = Mage::getModel('firegento_adminmonitoring/observer_log');
 }
 /**
  * Set up test class
  */
 protected function setUp()
 {
     parent::setUp();
     $this->_model = Mage::getModel('firegento_adminmonitoring/rowUrl_model_order');
 }
 public function setUp()
 {
     parent::setup();
     $this->_model = Mage::getModel('ops/api_directlink');
 }