當前位置: 首頁>>代碼示例>>PHP>>正文


PHP EcomDev_PHPUnit_Test_Case::setUp方法代碼示例

本文整理匯總了PHP中EcomDev_PHPUnit_Test_Case::setUp方法的典型用法代碼示例。如果您正苦於以下問題:PHP EcomDev_PHPUnit_Test_Case::setUp方法的具體用法?PHP EcomDev_PHPUnit_Test_Case::setUp怎麽用?PHP EcomDev_PHPUnit_Test_Case::setUp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在EcomDev_PHPUnit_Test_Case的用法示例。


在下文中一共展示了EcomDev_PHPUnit_Test_Case::setUp方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 /**
  * Initializes model under test and disables events
  * for checking logic in isolation from custom its customizations
  *
  * (non-PHPdoc)
  * @see EcomDev_PHPUnit_Test_Case::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->model = Mage::getModel('getfinancing/paymentMethod');
     $this->app()->disableEvents();
     $this->getfinancing = new GetFinancing_Magento($this->model);
 }
開發者ID:GetFinancing,項目名稱:getfinancing-magento,代碼行數:14,代碼來源:PaymentMethod.php

示例2: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->helper = Mage::helper('helpdesk/notification');
     $this->helper->emails = array();
     Mage::helper('msttest/mock')->mockSingletonMethod('helpdesk/config', array('getNotificationHistoryRecordsNumber' => 3));
 }
開發者ID:cesarfelip3,項目名稱:clevermage_new,代碼行數:7,代碼來源:Mirasvit_Helpdesk_Test_Helper_NotificationTest.php

示例3: setUp

 /**
  * setUp method
  */
 public function setUp()
 {
     parent::setUp();
     // checking if var directory exists, if not, then create it
     if (!is_dir(Mage::getBaseDir('var'))) {
         umask(0);
         mkdir(Mage::getBaseDir('var'), 0777, true);
     }
     // checking if log directory exists, if not, then create it
     if (!is_dir(Mage::getBaseDir('log'))) {
         umask(0);
         mkdir(Mage::getBaseDir('log'), 0777, true);
     }
     // checking if var/log/system.log file exist, if not create it
     if (!file_exists(Mage::getBaseDir('log') . DS . 'system.log')) {
         file_put_contents(Mage::getBaseDir('log') . DS . 'system.log', '');
     }
     // checking if var/log/exception.log file exist, if not create it
     if (!file_exists(Mage::getBaseDir('log') . DS . 'exception.log')) {
         file_put_contents(Mage::getBaseDir('log') . DS . 'exception.log', '');
     }
     // Preventing actual e-mail from being sent.
     $email = $this->getModelMock('ebayenterprise_magelog/logger_email', ['send']);
     $email->expects($this->any())->method('send')->will($this->returnSelf());
     $this->replaceByMock('model', 'ebayenterprise_magelog/logger_email', $email);
 }
開發者ID:kojiromike,項目名稱:magento-log,代碼行數:29,代碼來源:StreamTest.php

示例4: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->helper = Mage::helper('helpdesk/mail');
     $this->helper->emails = array();
     $this->markTestSkipped('We don"t use this testclass.');
 }
開發者ID:cesarfelip3,項目名稱:clevermage_new,代碼行數:7,代碼來源:Mirasvit_Helpdesk_Test_Helper_MailTest.php

示例5: setUp

 /**
  * Set up test class
  */
 protected function setUp()
 {
     parent::setUp();
     $this->_model = Mage::getModel('debit/entity_customer_attribute_backend_encrypted');
     $attribute = Mage::getModel('eav/entity_attribute')->loadByCode('customer', 'debit_payment_account_swift');
     $this->_model->setAttribute($attribute);
 }
開發者ID:dedlich,項目名稱:Magento-DebitPayment,代碼行數:10,代碼來源:Encrypted.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $this->shipping = Mage::getModel('shipping/shipping');
     $this->observer = $this->getModelMock('checkoutrule/observer', array('shippingMethods'));
     $this->observer->expects($this->any())->method('shippingMethods')->will($this->returnCallback(array($this, 'processShippingMethods')));
     $this->replaceByMock('model', 'checkoutrule/observer', $this->observer);
 }
開發者ID:Hospeed,項目名稱:Inovarti_PromoFilter,代碼行數:8,代碼來源:Shipping.php

示例7: setUp

 /**
  * Sets everything for a new test. parent::setUp() is necessary to enable fixtures.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->object = new ZerebroInternet_Barzahlen_Model_Adminexceptions_Maxordertotal();
     $this->object->setScope('default');
     $this->object->setScopeId(0);
     $this->object->setPath('payment/barzahlen/max_order_total');
 }
開發者ID:KaiBerkemeyer,項目名稱:Barzahlen-Magento-1,代碼行數:11,代碼來源:Maxordertotal.php

示例8: setUp

 /**
  * Set up controller params
  * (non-PHPdoc)
  * @see EcomDev_PHPUnit_Test_Case::setUp()
  */
 protected function setUp()
 {
     EcomDev_PHPUnit_Test_Case::setUp();
     $this->reset();
     //$this->registerCookieStub(); fix exception
     $this->getCookies()->reset();
     $this->app()->getFrontController()->init();
 }
開發者ID:all-bear,項目名稱:magento.cg-cms,代碼行數:13,代碼來源:IndexController.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_context = Mage::helper('ebayenterprise_magelog/context');
     // suppressing the real session from starting
     $session = $this->getModelMockBuilder('core/session')->disableOriginalConstructor()->setMethods(null)->getMock();
     $this->replaceByMock('singleton', 'core/session', $session);
 }
開發者ID:kojiromike,項目名稱:magento-log,代碼行數:8,代碼來源:ContextTest.php

示例10: setUp

 /**
  * Sets everything for a new test. parent::setUp() is necessary to enable fixtures.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->object = new ZerebroInternet_Barzahlen_Model_Adminexceptions_Paymentkey();
     $this->object->setScope('default');
     $this->object->setScopeId(0);
     $this->object->setPath('payment/barzahlen/payment_key');
 }
開發者ID:KaiBerkemeyer,項目名稱:Barzahlen-Magento-1,代碼行數:11,代碼來源:Paymentkey.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $payment = Mage::getModel('sales/order_payment');
     $payment->setAdditionalInformation('CC_BRAND', 'VISA');
     $this->testObjects[] = Mage::getModel('ops/payment_cc')->setInfoInstance($payment);
     $this->testObjects[] = Mage::getModel('ops/payment_directDebit');
 }
開發者ID:roshu1980,項目名稱:add-computers,代碼行數:8,代碼來源:DirectLinkTest.php

示例12: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->_removeAttribute();
     $this->_addAttribute();
     $this->_block = $this->app()->getLayout()->createBlock('adminhtml/catalog_product_attribute_edit_tab_options');
     $this->app()->addEventArea('adminhtml');
 }
開發者ID:giuseppemorelli,項目名稱:IntegerNet_AttributeOptionPager,代碼行數:8,代碼來源:Tab.php

示例13: setUp

 /**
  * Set up test class
  */
 protected function setUp()
 {
     parent::setUp();
     $this->_model = Mage::getModel('debit/debit');
     $infoInstance = Mage::getModel('payment/info');
     $infoInstance->setMethod($this->_model->getCode());
     $infoInstance->setMethodInstance($this->_model);
     $this->_model->setData('info_instance', $infoInstance);
 }
開發者ID:dedlich,項目名稱:Magento-DebitPayment,代碼行數:12,代碼來源:Debit.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_data = Mage::getModel('productquestions/productquestions');
     $this->_sess = Mage::getSingleton('core/session');
     $this->_customersess = Mage::getSingleton('customer/session');
     $this->_adminUrl = Mage::getSingleton('adminhtml/url');
     $this->_resource = Mage::getModel('productquestions/productquestions')->getResource();
 }
開發者ID:bigtailbear14,項目名稱:rosstheme,代碼行數:9,代碼來源:AW_Productquestions_Test_Model_Productquestions.php

示例15: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->helper = Mage::helper('helpdesk/process');
     $this->mockConfigMethod(array('getDefaultStatus' => 1, 'getContactFormDefaultDepartment' => 2, 'getDefaultPriority' => 3, 'getNotificationIsShowCode' => true));
     if (!Mage::registry('isSecureArea')) {
         Mage::register('isSecureArea', true);
     }
 }
開發者ID:cesarfelip3,項目名稱:clevermage_new,代碼行數:9,代碼來源:Mirasvit_Helpdesk_Test_Helper_ProcessTest.php


注:本文中的EcomDev_PHPUnit_Test_Case::setUp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。