当前位置: 首页>>代码示例>>PHP>>正文


PHP TestHelperHtml::getContext方法代码示例

本文整理汇总了PHP中TestHelperHtml::getContext方法的典型用法代码示例。如果您正苦于以下问题:PHP TestHelperHtml::getContext方法的具体用法?PHP TestHelperHtml::getContext怎么用?PHP TestHelperHtml::getContext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestHelperHtml的用法示例。


在下文中一共展示了TestHelperHtml::getContext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 protected function setUp()
 {
     $this->context = \TestHelperHtml::getContext();
     $paths = \TestHelperHtml::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Basket\Related\Bought\Standard($this->context, $paths);
     $this->object->setView(\TestHelperHtml::getView());
 }
开发者ID:aimeos,项目名称:ai-client-html,代码行数:7,代码来源:StandardTest.php

示例2: setUp

 protected function setUp()
 {
     $this->context = \TestHelperHtml::getContext();
     $paths = \TestHelperHtml::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Checkout\Standard\Order\Address\Standard($this->context, $paths);
     $this->object->setView(\TestHelperHtml::getView());
 }
开发者ID:aimeos,项目名称:ai-client-html,代码行数:7,代码来源:StandardTest.php

示例3: setUp

 /**
  * 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 \TestHelperHtml::getContext();
     $paths = \TestHelperHtml::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Account\History\Lists\Standard($this->context, $paths);
     $this->object->setView(\TestHelperHtml::getView());
 }
开发者ID:mvnp,项目名称:aimeos-core,代码行数:13,代码来源:StandardTest.php

示例4: setUp

 /**
  * 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 = \TestHelperHtml::getContext();
     $this->client = $this->getMockBuilder('\\Aimeos\\Client\\Html\\Catalog\\Filter\\Standard')->setMethods(array('getHeader', 'getBody', 'testMethod'))->setConstructorArgs(array($context, array()))->getMock();
     $this->object = new \Aimeos\Client\Html\Common\Decorator\Example($this->client, $context, array());
     $this->object->setView(\TestHelperHtml::getView());
 }
开发者ID:aimeos,项目名称:ai-client-html,代码行数:13,代码来源:ExampleTest.php

示例5: setUp

 /**
  * 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 = \TestHelperHtml::getContext();
     $config = $context->getConfig();
     $config->set('client/html/catalog/lists/basket-add', true);
     $paths = \TestHelperHtml::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 \RuntimeException('No catalog item found');
     }
     $domains = array('media', 'price', 'text', 'attribute', 'product');
     $productManager = \Aimeos\MShop\Product\Manager\Factory::createManager($context);
     $search = $productManager->createSearch();
     $search->setConditions($search->compare('==', 'product.code', array('CNE', 'U:TEST', 'U:BUNDLE')));
     $total = 0;
     $view = \TestHelperHtml::getView('unittest', $config);
     $view->listProductItems = $productManager->searchItems($search, $domains, $total);
     $view->listProductTotal = $total;
     $view->listPageSize = 100;
     $view->listPageCurr = 1;
     $view->listParams = array();
     $view->listCatPath = array($catalogManager->createItem(), $catItem);
     $this->object->setView($view);
 }
开发者ID:aimeos,项目名称:ai-client-html,代码行数:34,代码来源:StandardTest.php

示例6: setUp

 /**
  * 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 = \TestHelperHtml::getContext();
     $paths = \TestHelperHtml::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Catalog\Session\Pinned\Standard($this->context, $paths);
     $this->object->setView(\TestHelperHtml::getView());
 }
开发者ID:mvnp,项目名称:aimeos-core,代码行数:13,代码来源:StandardTest.php

示例7: setUp

 protected function setUp()
 {
     $this->view = \TestHelperHtml::getView();
     $this->context = \TestHelperHtml::getContext();
     $paths = \TestHelperHtml::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Account\Download\Standard($this->context, $paths);
     $this->object->setView($this->view);
 }
开发者ID:aimeos,项目名称:ai-client-html,代码行数:8,代码来源:StandardTest.php

示例8: setUp

 protected function setUp()
 {
     \Aimeos\MShop\Factory::setCache(true);
     $this->context = \TestHelperHtml::getContext();
     $paths = \TestHelperHtml::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Checkout\Standard\Order\Account\Standard($this->context, $paths);
     $this->object->setView(\TestHelperHtml::getView());
 }
开发者ID:mvnp,项目名称:aimeos-core,代码行数:8,代码来源:StandardTest.php

示例9: setUp

 protected function setUp()
 {
     $this->context = \TestHelperHtml::getContext();
     $this->context->setEditor('UTC001');
     $paths = \TestHelperHtml::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Checkout\Confirm\Standard($this->context, $paths);
     $this->object->setView(\TestHelperHtml::getView());
 }
开发者ID:aimeos,项目名称:ai-client-html,代码行数:8,代码来源:StandardTest.php

示例10: getProductItem

 /**
  * @param string $code
  */
 protected function getProductItem($code)
 {
     $manager = \Aimeos\MShop\Product\Manager\Factory::createManager(\TestHelperHtml::getContext());
     $search = $manager->createSearch();
     $search->setConditions($search->compare('==', 'product.code', $code));
     $items = $manager->searchItems($search, array('attribute', 'price', 'product'));
     if (($item = reset($items)) === false) {
         throw new \Exception(sprintf('No product item with code "%1$s" found', $code));
     }
     return $item;
 }
开发者ID:mvnp,项目名称:aimeos-core,代码行数:14,代码来源:StandardTest.php

示例11: getProductItem

 protected function getProductItem()
 {
     $manager = \Aimeos\MShop\Product\Manager\Factory::createManager(\TestHelperHtml::getContext());
     $search = $manager->createSearch();
     $search->setConditions($search->compare('==', 'product.code', 'CNC'));
     $items = $manager->searchItems($search);
     if (($item = reset($items)) === false) {
         throw new \Exception('No product item with code "CNC" found');
     }
     return $item;
 }
开发者ID:mvnp,项目名称:aimeos-core,代码行数:11,代码来源:StandardTest.php

示例12: setUp

 /**
  * 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 = \TestHelperHtml::getContext();
     $this->emailMock = $this->getMock('\\Aimeos\\MW\\Mail\\Message\\None');
     $paths = \TestHelperHtml::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Email\Watch\Html\Salutation\Standard($this->context, $paths);
     $view = \TestHelperHtml::getView();
     $view->extAddressItem = self::$customerItem->getPaymentAddress();
     $view->addHelper('mail', new \Aimeos\MW\View\Helper\Mail\Standard($view, $this->emailMock));
     $this->object->setView($view);
 }
开发者ID:mvnp,项目名称:aimeos-core,代码行数:17,代码来源:StandardTest.php

示例13: testTransformRelativeUrlFromConfig

 public function testTransformRelativeUrlFromConfig()
 {
     $view = new \Aimeos\MW\View\Standard();
     $helper = new \Aimeos\MW\View\Helper\Encoder\Standard($view);
     $view->addHelper('encoder', $helper);
     $helper = new \Aimeos\MW\View\Helper\Config\Standard($view, \TestHelperHtml::getContext()->getConfig());
     $view->addHelper('config', $helper);
     $this->object = new \Aimeos\MW\View\Helper\Content\Standard($view);
     $output = $this->object->transform('path/to/resource');
     $this->assertEquals('/path/to/resource', $output);
 }
开发者ID:mvnp,项目名称:aimeos-core,代码行数:11,代码来源:StandardTest.php

示例14: setUp

 /**
  * 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 = \TestHelperHtml::getContext();
     $this->emailMock = $this->getMock('\\Aimeos\\MW\\Mail\\Message\\None');
     $paths = \TestHelperHtml::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Email\Payment\Html\Legal\Standard($this->context, $paths);
     $view = \TestHelperHtml::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);
 }
开发者ID:skyheights,项目名称:aimeos-core,代码行数:18,代码来源:StandardTest.php

示例15: setUp

 /**
  * 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 = \TestHelperHtml::getContext();
     $this->emailMock = $this->getMockBuilder('\\Aimeos\\MW\\Mail\\Message\\None')->getMock();
     $paths = \TestHelperHtml::getHtmlTemplatePaths();
     $this->object = new \Aimeos\Client\Html\Email\Payment\Standard($this->context, $paths);
     $view = \TestHelperHtml::getView('unittest', $this->context->getConfig());
     $view->extOrderItem = self::$orderItem;
     $view->extOrderBaseItem = self::$orderBaseItem;
     $view->extAddressItem = self::$orderBaseItem->getAddress(\Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT);
     $view->addHelper('mail', new \Aimeos\MW\View\Helper\Mail\Standard($view, $this->emailMock));
     $this->object->setView($view);
 }
开发者ID:aimeos,项目名称:ai-client-html,代码行数:19,代码来源:StandardTest.php


注:本文中的TestHelperHtml::getContext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。