Ejemplo n.º 1
0
 public function setup()
 {
     parent::setup();
     $this->settings = new ProductPresentationSettings();
     $this->settings->catalog_mode = false;
     $this->settings->restricted_country_mode = false;
     $this->settings->showPrices = true;
     $this->product = [];
     $this->product['available_for_order'] = true;
     $this->product['id_product'] = 1;
     $this->product['id_product_attribute'] = 0;
     $this->product['link_rewrite'] = 'hérisson';
     $this->product['price'] = null;
     $this->product['price_tax_exc'] = null;
     $this->product['specific_prices'] = null;
     $this->product['customizable'] = false;
     $this->product['quantity'] = 1;
     $this->product['allow_oosp'] = false;
     $this->product['online_only'] = false;
     $this->product['reduction'] = false;
     $this->product['on_sale'] = false;
     $this->product['new'] = false;
     $this->product['pack'] = false;
     $this->product['show_price'] = true;
     $this->language = new Language();
 }
Ejemplo n.º 2
0
 public function setUp()
 {
     parent::setUp();
     $this->context->language = new \Language();
     $this->context->language->id = 42;
     $this->legacyContext = Phake::partialMock('PrestaShop\\PrestaShop\\Adapter\\LegacyContext');
     Phake::when($this->legacyContext)->getAdminBaseUrl()->thenReturn('admin_fake_base');
     $this->setupSfKernel();
 }
Ejemplo n.º 3
0
 public function setup()
 {
     parent::setup();
     $context = new Context();
     $context->language = new Language();
     $context->customer = new Customer();
     $context->link = Phake::mock('Link');
     Phake::when($context->link)->getPageLink(Phake::anyParameters())->thenReturn('http://addresses-actions.url');
     $smarty = Phake::mock('Smarty');
     $translator = Phake::mock('Symfony\\Component\\Translation\\TranslatorInterface');
     $addressForm = Phake::mock('CustomerAddressForm');
     $this->session = Phake::mock('CheckoutSession');
     Phake::when($this->session)->getCustomer()->thenReturn($context->customer);
     $process = new CheckoutProcess($context, $this->session);
     $this->step = new CheckoutAddressesStep($context, $translator, $addressForm);
     $this->step->setCheckoutProcess($process);
 }
Ejemplo n.º 4
0
 public function teardown()
 {
     parent::teardown();
     Tools::$round_mode = null;
 }
Ejemplo n.º 5
0
 public function setup()
 {
     $this->hookRepository = Phake::mock('PrestaShop\\PrestaShop\\Core\\Module\\HookRepository');
     $this->hookConfigurator = new HookConfigurator($this->hookRepository);
     parent::setup();
 }
 public function teardown()
 {
     parent::teardown();
     if ($this->httpHostNotFound) {
         unset($_SERVER['HTTP_HOST']);
     }
     $this->clearModuleCache();
 }
 public function teardown()
 {
     parent::tearDownCommonStaticMocks();
 }
Ejemplo n.º 8
0
 public function teardown()
 {
     parent::teardown();
     if ($this->http_host_not_found) {
         unset($_SERVER['HTTP_HOST']);
     }
     $this->moduleRepositoryStub->clearCache();
 }