Beispiel #1
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->_context = clone TestHelper::getContext();
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Account_History_Detail_Default($this->_context, $paths);
     $this->_object->setView(TestHelper::getView());
 }
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $context = \TestHelper::getContext();
     $paths = \TestHelper::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Catalog\Lists\Items\Standard($context, $paths);
     $catalogManager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($context);
     $search = $catalogManager->createSearch();
     $search->setConditions($search->compare('==', 'catalog.code', 'cafe'));
     $catItems = $catalogManager->searchItems($search);
     if (($catItem = reset($catItems)) === false) {
         throw new \Exception('No catalog item found');
     }
     $productManager = \Aimeos\MShop\Product\Manager\Factory::createManager($context);
     $search = $productManager->createSearch();
     $search->setConditions($search->compare('==', 'product.code', array('CNC', 'CNE')));
     $total = 0;
     $view = \TestHelper::getView();
     $view->listProductItems = $productManager->searchItems($search, array('media', 'price', 'text'), $total);
     $view->listProductTotal = $total;
     $view->listPageSize = 100;
     $view->listPageCurr = 1;
     $view->listParams = array();
     $view->listCatPath = array($catalogManager->createItem(), $catItem);
     $this->object->setView($view);
 }
Beispiel #3
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->_context = TestHelper::getContext();
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Checkout_Standard_Summary_Service_Default($this->_context, $paths);
     $this->_object->setView(TestHelper::getView());
 }
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->context = clone \TestHelper::getContext();
     $paths = \TestHelper::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Account\History\Lists\Standard($this->context, $paths);
     $this->object->setView(\TestHelper::getView());
 }
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->context = \TestHelper::getContext();
     $paths = \TestHelper::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Checkout\Standard\Payment\Standard($this->context, $paths);
     $this->object->setView(\TestHelper::getView());
 }
Beispiel #6
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->_context = TestHelper::getContext();
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Catalog_Session_Pinned_Default($this->_context, $paths);
     $this->_object->setView(TestHelper::getView());
 }
Beispiel #7
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $context = TestHelper::getContext();
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Catalog_List_Items_Default($context, $paths);
     $catalogManager = MShop_Catalog_Manager_Factory::createManager($context);
     $search = $catalogManager->createSearch();
     $search->setConditions($search->compare('==', 'catalog.code', 'cafe'));
     $catItems = $catalogManager->searchItems($search);
     if (($catItem = reset($catItems)) === false) {
         throw new Exception('No catalog item found');
     }
     $productManager = MShop_Product_Manager_Factory::createManager($context);
     $search = $productManager->createSearch();
     $search->setConditions($search->compare('==', 'product.code', array('CNC', 'CNE')));
     $total = 0;
     $view = TestHelper::getView();
     $view->listProductItems = $productManager->searchItems($search, array('media', 'price', 'text'), $total);
     $view->listProductTotal = $total;
     $view->listPageSize = 100;
     $view->listPageCurr = 1;
     $view->listParams = array();
     $view->listCatPath = array($catalogManager->createItem(), $catItem);
     $this->_object->setView($view);
 }
Beispiel #8
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->_context = TestHelper::getContext();
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Catalog_List_Simple($this->_context, $paths);
     $this->_object->setView(TestHelper::getView());
 }
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->context = \TestHelper::getContext();
     $paths = \TestHelper::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Catalog\Session\Pinned\Standard($this->context, $paths);
     $this->object->setView(\TestHelper::getView());
 }
Beispiel #10
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->_context = TestHelper::getContext();
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Basket_Mini_Default($this->_context, $paths);
     $this->_object->setView(TestHelper::getView());
 }
Beispiel #11
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->_context = TestHelper::getContext();
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Checkout_Confirm_Intro_Default($this->_context, $paths);
     $this->_object->setView(TestHelper::getView());
 }
Beispiel #12
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $context = TestHelper::getContext();
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Catalog_Stage_Navigator_Default($context, $paths);
     $this->_object->setView(TestHelper::getView());
 }
 protected function setUp()
 {
     \Aimeos\MShop\Factory::setCache(true);
     $this->context = \TestHelper::getContext();
     $paths = \TestHelper::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Checkout\Standard\Order\Account\Standard($this->context, $paths);
     $this->object->setView(\TestHelper::getView());
 }
Beispiel #14
0
 protected function setUp()
 {
     MShop_Factory::setCache(true);
     $this->_context = TestHelper::getContext();
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Checkout_Standard_Order_Account_Default($this->_context, $paths);
     $this->_object->setView(TestHelper::getView());
 }
Beispiel #15
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->_context = TestHelper::getContext();
     $this->_emailMock = $this->getMock('MW_Mail_Message_None');
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Email_Watch_Text_Salutation_Default($this->_context, $paths);
     $view = TestHelper::getView();
     $view->extAddressItem = self::$_customerItem->getPaymentAddress();
     $view->addHelper('mail', new MW_View_Helper_Mail_Default($view, $this->_emailMock));
     $this->_object->setView($view);
 }
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->context = \TestHelper::getContext();
     $this->emailMock = $this->getMock('\\Aimeos\\MW\\Mail\\Message\\None');
     $paths = \TestHelper::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Email\Account\Text\Outro\Standard($this->context, $paths);
     $view = \TestHelper::getView();
     $view->extAddressItem = self::$customerItem->getPaymentAddress();
     $view->addHelper('mail', new \Aimeos\MW\View\Helper\Mail\Standard($view, $this->emailMock));
     $this->object->setView($view);
 }
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->context = \TestHelper::getContext();
     $this->emailMock = $this->getMock('\\Aimeos\\MW\\Mail\\Message\\None');
     $paths = \TestHelper::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Email\Delivery\Html\Intro\Standard($this->context, $paths);
     $view = \TestHelper::getView();
     $view->extOrderItem = self::$orderItem;
     $view->extOrderBaseItem = self::$orderBaseItem;
     $view->addHelper('mail', new \Aimeos\MW\View\Helper\Mail\Standard($view, $this->emailMock));
     $this->object->setView($view);
 }
Beispiel #18
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->_context = TestHelper::getContext();
     $this->_emailMock = $this->getMock('MW_Mail_Message_None');
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Email_Delivery_Text_Summary_Address_Default($this->_context, $paths);
     $view = TestHelper::getView();
     $view->extOrderItem = self::$_orderItem;
     $view->extOrderBaseItem = self::$_orderBaseItem;
     $view->addHelper('mail', new MW_View_Helper_Mail_Default($view, $this->_emailMock));
     $this->_object->setView($view);
 }
Beispiel #19
0
 public function testGetBodyDefaultCat()
 {
     $context = clone $this->_context;
     $context->getConfig()->set('client/html/catalog/list/catid-default', $this->_getCatalogItem()->getId());
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Catalog_List_Default($context, $paths);
     $this->_object->setView(TestHelper::getView());
     $view = $this->_object->getView();
     $helper = new MW_View_Helper_Parameter_Default($view, array());
     $view->addHelper('param', $helper);
     $output = $this->_object->getBody();
     $this->assertStringStartsWith('<section class="arcavias catalog-list home categories coffee">', $output);
 }
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->context = \TestHelper::getContext();
     $this->emailMock = $this->getMock('\\Aimeos\\MW\\Mail\\Message\\None');
     $paths = \TestHelper::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Email\Delivery\Text\Salutation\Standard($this->context, $paths);
     $view = \TestHelper::getView();
     $view->extOrderItem = self::$orderItem;
     $view->extOrderBaseItem = self::$orderBaseItem;
     $view->extAddressItem = self::$orderBaseItem->getAddress(\Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_DELIVERY);
     $view->addHelper('mail', new \Aimeos\MW\View\Helper\Mail\Standard($view, $this->emailMock));
     $this->object->setView($view);
 }
Beispiel #21
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->_context = TestHelper::getContext();
     $this->_emailMock = $this->getMock('MW_Mail_Message_None');
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Email_Delivery_Html_Salutation_Default($this->_context, $paths);
     $view = TestHelper::getView();
     $view->extOrderItem = self::$_orderItem;
     $view->extOrderBaseItem = self::$_orderBaseItem;
     $view->extAddressItem = self::$_orderBaseItem->getAddress(MShop_Order_Item_Base_Address_Abstract::TYPE_DELIVERY);
     $view->addHelper('mail', new MW_View_Helper_Mail_Default($view, $this->_emailMock));
     $this->_object->setView($view);
 }
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $context = \TestHelper::getContext();
     $paths = \TestHelper::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Catalog\Stage\Breadcrumb\Standard($context, $paths);
     $catalogManager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($context);
     $search = $catalogManager->createSearch();
     $search->setConditions($search->compare('==', 'catalog.code', 'cafe'));
     $catItems = $catalogManager->searchItems($search);
     if (($catItem = reset($catItems)) === false) {
         throw new \Exception('No catalog item found');
     }
     $view = \TestHelper::getView();
     $view->stageCatPath = $catalogManager->getPath($catItem->getId());
     $this->object->setView($view);
 }
Beispiel #23
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $context = TestHelper::getContext();
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Catalog_Stage_Image_Default($context, $paths);
     $catalogManager = MShop_Catalog_Manager_Factory::createManager($context);
     $search = $catalogManager->createSearch();
     $search->setConditions($search->compare('==', 'catalog.code', 'cafe'));
     $catItems = $catalogManager->searchItems($search, array('media'));
     if (($catItem = reset($catItems)) === false) {
         throw new Exception('No catalog item found');
     }
     $view = TestHelper::getView();
     $view->stageCatPath = array($catItem);
     $this->_object->setView($view);
 }
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $context = \TestHelper::getContext();
     $paths = \TestHelper::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Catalog\Lists\Promo\Standard($context, $paths);
     $catalogManager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($context);
     $search = $catalogManager->createSearch();
     $search->setConditions($search->compare('==', 'catalog.code', 'cafe'));
     $catItems = $catalogManager->searchItems($search, array('product'));
     if (($catItem = reset($catItems)) === false) {
         throw new \Exception('No catalog item found');
     }
     $view = \TestHelper::getView();
     $view->listParams = array();
     $view->listCurrentCatItem = $catItem;
     $this->object->setView($view);
 }
Beispiel #25
0
 public function testProcessNoService()
 {
     $view = $this->_object->getView();
     $param = array('c_step' => 'process');
     $helper = new MW_View_Helper_Parameter_Default($view, $param);
     $view->addHelper('param', $helper);
     $orderid = $this->_getOrder('2008-02-15 12:34:56')->getId();
     $this->_context->getSession()->set('arcavias/orderid', $orderid);
     $paths = TestHelper::getHtmlTemplatePaths();
     $mock = $this->getMockBuilder('Client_Html_Checkout_Standard_Process_Default')->setConstructorArgs(array($this->_context, $paths))->setMethods(array('_getOrderServiceCode'))->getMock();
     $mock->expects($this->once())->method('_getOrderServiceCode')->will($this->returnValue(null));
     $mock->setView($view);
     $mock->process();
     $this->assertEquals(0, count($view->get('standardErrorList', array())));
     $this->assertEquals(0, count($view->get('standardProcessParams', array())));
     $this->assertEquals('GET', $view->standardMethod);
     $this->assertEquals('http://baseurl/checkout/standard/?c_step=payment', $view->standardUrlPayment);
 }
Beispiel #26
0
 protected function setUp()
 {
     $this->paths = \TestHelper::getHtmlTemplatePaths();
     $this->context = \TestHelper::getContext('unitperf');
     $catalogManager = \Aimeos\MShop\Catalog\Manager\Factory::createManager($this->context);
     $search = $catalogManager->createSearch();
     $search->setConditions($search->compare('==', 'catalog.code', 'home'));
     $items = $catalogManager->searchItems($search);
     if (($catalogItem = reset($items)) === false) {
         throw new \Exception('No catalog item with code "home" found');
     }
     $productManager = \Aimeos\MShop\Product\Manager\Factory::createManager($this->context);
     $search = $productManager->createSearch();
     $search->setConditions($search->compare('==', 'product.code', 'perf-00000'));
     $items = $productManager->searchItems($search);
     if (($productItem = reset($items)) === false) {
         throw new \Exception('No product item with code "perf-00000" found');
     }
     $this->view = \TestHelper::getView('unitperf');
     $param = array('f_catid' => $catalogItem->getId(), 'd_prodid' => $productItem->getId());
     $helper = new \Aimeos\MW\View\Helper\Parameter\Standard($this->view, $param);
     $this->view->addHelper('param', $helper);
 }
Beispiel #27
0
 protected function setUp()
 {
     $this->_paths = TestHelper::getHtmlTemplatePaths();
     $this->_context = TestHelper::getContext('unitperf');
     $catalogManager = MShop_Catalog_Manager_Factory::createManager($this->_context);
     $search = $catalogManager->createSearch();
     $search->setConditions($search->compare('==', 'catalog.code', 'home'));
     $items = $catalogManager->searchItems($search);
     if (($catalogItem = reset($items)) === false) {
         throw new Exception('No catalog item with code "home" found');
     }
     $productManager = MShop_Product_Manager_Factory::createManager($this->_context);
     $search = $productManager->createSearch();
     $search->setConditions($search->compare('==', 'product.code', 'perf-00000'));
     $items = $productManager->searchItems($search);
     if (($productItem = reset($items)) === false) {
         throw new Exception('No product item with code "perf-00000" found');
     }
     $this->_view = TestHelper::getView('unitperf');
     $param = array('f_catid' => $catalogItem->getId(), 'd_prodid' => $productItem->getId());
     $helper = new MW_View_Helper_Parameter_Default($this->_view, $param);
     $this->_view->addHelper('param', $helper);
 }
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $paths = \TestHelper::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Catalog\Detail\Suggest\Standard(\TestHelper::getContext(), $paths);
     $this->object->setView(\TestHelper::getView());
 }
Beispiel #29
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $this->_context = TestHelper::getContext();
     $this->_templatePaths = TestHelper::getHtmlTemplatePaths();
 }
Beispiel #30
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $paths = TestHelper::getHtmlTemplatePaths();
     $this->_object = new Client_Html_Catalog_Filter_Attribute_Default(TestHelper::getContext(), $paths);
     $this->_object->setView(TestHelper::getView());
 }