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


PHP TestHelper::getAimeos方法代码示例

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


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

示例1: testFactoryExceptionWrongInterface

 public function testFactoryExceptionWrongInterface()
 {
     $context = \TestHelper::getContext();
     $aimeos = \TestHelper::getAimeos();
     $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
     \Aimeos\Controller\Jobs\Index\Optimize\Factory::createController($context, $aimeos, 'Factory');
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:7,代码来源:FactoryTest.php

示例2: setUp

 protected function setUp()
 {
     \Aimeos\MShop\Factory::setCache(true);
     $context = \TestHelper::getContext();
     $aimeos = \TestHelper::getAimeos();
     $this->object = new TestAbstract($context, $aimeos);
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:7,代码来源:BaseTest.php

示例3: testFactoryExceptionWrongInterface

 public function testFactoryExceptionWrongInterface()
 {
     $context = \TestHelper::getContext();
     $aimeos = \TestHelper::getAimeos();
     $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception');
     $object = \Aimeos\Controller\Jobs\Product\Import\Csv\Factory::createController($context, $aimeos, 'Factory');
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:7,代码来源:FactoryTest.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 = \TestHelper::getContext();
     $aimeos = \TestHelper::getAimeos();
     $this->stub = $this->getMockBuilder('\\Aimeos\\Controller\\Jobs\\Admin\\Job\\Standard')->setConstructorArgs(array($context, $aimeos))->getMock();
     $this->object = new TestBase($context, $aimeos, $this->stub);
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:13,代码来源:BaseTest.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()
 {
     \Aimeos\MShop\Factory::setCache(true);
     $this->context = \TestHelper::getContext();
     $this->aimeos = \TestHelper::getAimeos();
     $this->object = new \Aimeos\Controller\Jobs\Product\Bought\Standard($this->context, $this->aimeos);
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:13,代码来源:StandardTest.php

示例6: testImport

 public function testImport()
 {
     $aimeos = \TestHelper::getAimeos();
     $cntl = \Aimeos\Controller\Jobs\Product\Import\Csv\Factory::createController($this->context, $aimeos, 'Standard');
     $start = microtime(true);
     $cntl->run();
     $stop = microtime(true);
     echo "\n    product import CSV: " . ($stop - $start) . " sec\n";
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:9,代码来源:StandardTest.php

示例7: testGetControllers

 public function testGetControllers()
 {
     $context = \TestHelper::getContext();
     $aimeos = \TestHelper::getAimeos();
     $list = \Aimeos\Controller\Jobs\Factory::getControllers($context, $aimeos, \TestHelper::getControllerPaths());
     $this->assertGreaterThan(0, count($list));
     foreach ($list as $key => $object) {
         $this->assertInstanceOf('\\Aimeos\\Controller\\Jobs\\Iface', $object);
     }
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:10,代码来源:FactoryTest.php

示例8: 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()
 {
     \Aimeos\MShop\Factory::setCache(true);
     $this->context = \TestHelper::getContext();
     $this->aimeos = \TestHelper::getAimeos();
     $config = $this->context->getConfig();
     $config->set('controller/jobs/product/import/csv/skip-lines', 1);
     $config->set('controller/jobs/product/import/csv/location', __DIR__ . '/_testfiles/valid');
     $this->object = new \Aimeos\Controller\Jobs\Product\Import\Csv\Standard($this->context, $this->aimeos);
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:16,代码来源:StandardTest.php

示例9: testRun

 public function testRun()
 {
     $context = \TestHelper::getContext();
     $aimeos = \TestHelper::getAimeos();
     $name = 'ControllerJobsCatalogIndexOptimizeDefaultRun';
     $context->getConfig()->set('mshop/index/manager/name', $name);
     $indexManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Index\\Manager\\Standard')->setMethods(array('optimize'))->setConstructorArgs(array($context))->getMock();
     \Aimeos\MShop\Catalog\Manager\Factory::injectManager('\\Aimeos\\MShop\\Index\\Manager\\' . $name, $indexManagerStub);
     $indexManagerStub->expects($this->once())->method('optimize');
     $object = new \Aimeos\Controller\Jobs\Index\Optimize\Standard($context, $aimeos);
     $object->run();
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:12,代码来源:StandardTest.php

示例10: testRunInvalidMethod

 /**
  * @dataProvider methodProvider
  */
 public function testRunInvalidMethod($method)
 {
     $context = \TestHelper::getContext();
     $aimeos = \TestHelper::getAimeos();
     $name = 'ControllerJobsAdminJobDefaultRun';
     $context->getConfig()->set('madmin/job/manager/name', $name);
     $object = new \Aimeos\Controller\Jobs\Admin\Job\Standard($context, $aimeos);
     \Aimeos\MAdmin\Job\Manager\Factory::injectManager('\\Aimeos\\MAdmin\\Job\\Manager\\' . $name, $this->jobManagerStub);
     $this->jobManagerStub->expects($this->atLeastOnce())->method('searchItems')->will($this->onConsecutiveCalls(array($this->jobItemStub), array()));
     $this->jobManagerStub->expects($this->once())->method('saveItem');
     $this->jobItemStub->expects($this->atLeastOnce())->method('getMethod')->will($this->returnValue($method));
     $this->jobItemStub->expects($this->once())->method('setStatus')->with($this->equalTo(0));
     $object->run();
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:17,代码来源:StandardTest.php

示例11: testRunExceptionProcess

 public function testRunExceptionProcess()
 {
     $context = \TestHelper::getContext();
     $aimeos = \TestHelper::getAimeos();
     $name = 'ControllerJobsServiceAsyncProcessDefaultRun';
     $context->getConfig()->set('mshop/service/manager/name', $name);
     $serviceManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard')->setMethods(array('getProvider', 'searchItems'))->setConstructorArgs(array($context))->getMock();
     \Aimeos\MShop\Service\Manager\Factory::injectManager('\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub);
     $serviceItem = $serviceManagerStub->createItem();
     $serviceManagerStub->expects($this->once())->method('searchItems')->will($this->onConsecutiveCalls(array($serviceItem), array()));
     $serviceManagerStub->expects($this->once())->method('getProvider')->will($this->throwException(new \Aimeos\MShop\Service\Exception()));
     $object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard($context, $aimeos);
     $object->run();
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:14,代码来源:StandardTest.php

示例12: testRunException

 public function testRunException()
 {
     $context = \TestHelper::getContext();
     $aimeos = \TestHelper::getAimeos();
     $mailStub = $this->getMockBuilder('\\Aimeos\\MW\\Mail\\None')->disableOriginalConstructor()->getMock();
     $context->setMail($mailStub);
     $name = 'ControllerJobsEmailPaymentDefaultRun';
     $context->getConfig()->set('mshop/order/manager/name', $name);
     $orderManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Standard')->setMethods(array('searchItems'))->setConstructorArgs(array($context))->getMock();
     \Aimeos\MShop\Order\Manager\Factory::injectManager('\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub);
     $orderItem = $orderManagerStub->createItem();
     $orderManagerStub->expects($this->exactly(4))->method('searchItems')->will($this->onConsecutiveCalls(array($orderItem), array(), array(), array()));
     $object = new \Aimeos\Controller\Jobs\Order\Email\Payment\Standard($context, $aimeos);
     $object->run();
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:15,代码来源:StandardTest.php

示例13: testRun

 public function testRun()
 {
     $context = \TestHelper::getContext();
     $aimeos = \TestHelper::getAimeos();
     $name = 'ControllerJobsOrderCleanupUnfinishedDefaultRun';
     $context->getConfig()->set('mshop/order/manager/name', $name);
     $context->getConfig()->set('controller/common/order/name', $name);
     $orderManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Standard')->setMethods(array('searchItems', 'getSubManager'))->setConstructorArgs(array($context))->getMock();
     $orderBaseManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Base\\Standard')->setMethods(array('deleteItems'))->setConstructorArgs(array($context))->getMock();
     $orderCntlStub = $this->getMockBuilder('\\Aimeos\\Controller\\Common\\Order\\Standard')->setMethods(array('unblock'))->setConstructorArgs(array($context))->getMock();
     \Aimeos\MShop\Order\Manager\Factory::injectManager('\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub);
     \Aimeos\Controller\Common\Order\Factory::injectController('\\Aimeos\\Controller\\Common\\Order\\' . $name, $orderCntlStub);
     $orderItem = $orderManagerStub->createItem();
     $orderItem->setBaseId(1);
     $orderItem->setId(2);
     $orderManagerStub->expects($this->once())->method('getSubManager')->will($this->returnValue($orderBaseManagerStub));
     $orderManagerStub->expects($this->once())->method('searchItems')->will($this->returnValue(array($orderItem->getId() => $orderItem)));
     $orderBaseManagerStub->expects($this->once())->method('deleteItems');
     $orderCntlStub->expects($this->once())->method('unblock');
     $object = new \Aimeos\Controller\Jobs\Order\Cleanup\Unfinished\Standard($context, $aimeos);
     $object->run();
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:22,代码来源:StandardTest.php

示例14: setUp

 public function setUp()
 {
     $context = \TestHelper::getContext();
     $aimeos = \TestHelper::getAimeos();
     $this->object = new TestAbstract($context, $aimeos);
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:6,代码来源:BaseTest.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 = \TestHelper::getContext();
     $this->aimeos = \TestHelper::getAimeos();
     $this->object = new \Aimeos\Controller\Jobs\Customer\Email\Watch\Standard($this->context, $this->aimeos);
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:12,代码来源:StandardTest.php


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