public function setUp() { parent::setUp(); ShopTest::setConfiguration(); //set up steps SteppedCheckout::setupSteps(); //use default steps $this->socks = $this->objFromFixture("Product", "socks"); $this->socks->publish('Stage', 'Live'); $checkoutpage = $this->objFromFixture("CheckoutPage", "checkout"); $checkoutpage->publish('Stage', 'Live'); $this->checkout = new CheckoutPage_Controller(); $this->checkout->handleRequest(new SS_HTTPRequest("GET", "checkout"), DataModel::inst()); $this->cart = $this->objFromFixture("Order", "cart"); ShoppingCart::singleton()->setCurrent($this->cart); }
<?php define('SHOP_DIR', basename(__DIR__)); define('SHOP_PATH', BASE_PATH . DIRECTORY_SEPARATOR . SHOP_DIR); Object::useCustomClass('Currency', 'ShopCurrency', true); if ($checkoutsteps = CheckoutPage::config()->steps) { SteppedCheckout::setupSteps($checkoutsteps); }