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


PHP TestHelper::Instance方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     $this->helper = \TestHelper::Instance();
     $this->initPluginNamespaces();
     $this->initTestNamespace();
     $this->initServiceContainerSubscriber();
 }
开发者ID:zirkeldesign,项目名称:SwagDefaultSort,代码行数:7,代码来源:SwagDefaultSortSearchTestHelper.php

示例2: setUp

 public function setUp()
 {
     $helper = \TestHelper::Instance();
     $loader = $helper->Container()->get('loader');
     $pluginDir = $helper->DocPath() . 'engine/Shopware/Plugins/Default/Core/RestApi';
     $loader->registerNamespace('ShopwarePlugins\\RestApi\\Components', $pluginDir . '/Components/');
     $this->router = new Router();
 }
开发者ID:ClaudioThomas,项目名称:shopware-4,代码行数:8,代码来源:RouterTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $helper = \TestHelper::Instance();
     $loader = $helper->Loader();
     $pluginDir = getcwd() . '/../';
     $loader->registerNamespace('Shopware\\SwagModelPlugin', $pluginDir);
 }
开发者ID:shobcheye,项目名称:devdocs,代码行数:8,代码来源:Test.php

示例4: setUp

 /**
  *
  */
 public function setUp()
 {
     parent::setUp();
     $app = TestHelper::Instance();
     $request = $this->Request();
     $request->setPathInfo(null);
     $this->Front()->setRequest($request);
     //$this->Template()->force_compile = true;
     $this->Template()->addTemplateDir($app->TestPath('DataSets'), 'Ticket5302');
 }
开发者ID:ClaudioThomas,项目名称:shopware-4,代码行数:13,代码来源:Ticket5302Test.php

示例5: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     parent::setUp();
     $helper = TestHelper::Instance();
     $hostname = $helper->Shop()->getHost();
     if (empty($hostname)) {
         $this->markTestSkipped('Hostname is not available.');
     }
     $this->apiBaseUrl = 'http://' . $hostname . $helper->Shop()->getBasePath() . '/api';
     Shopware()->Db()->query('UPDATE s_core_auth SET apiKey = ? WHERE username LIKE "demo"', array(sha1('demo')));
 }
开发者ID:GerDner,项目名称:luck-docker,代码行数:15,代码来源:MediaTest.php

示例6: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $helper = \TestHelper::Instance();
     $loader = $helper->Loader();
     $pluginDir = $helper->DocPath() . 'engine/Shopware/Plugins/Default/Core/PaymentMethods';
     $loader->registerNamespace('ShopwarePlugin\\PaymentMethods\\Components', $pluginDir . '/Components/');
     //Debit needs to be active for this. Also, we need to save existing status to later restore it
     $debitPaymentMean = Shopware()->Models()->getRepository('\\Shopware\\Models\\Payment\\Payment')->findOneByName('debit');
     self::$debitStatus = $debitPaymentMean->getActive();
     $debitPaymentMean->setActive(true);
     Shopware()->Models()->flush($debitPaymentMean);
     self::$debitPaymentMethod = new DebitPaymentMethod();
 }
开发者ID:GerDner,项目名称:luck-docker,代码行数:14,代码来源:DebitPaymentMethodTest.php

示例7: basename

<?php

require "./../../../../../../tests/Shopware/TestHelper.php";
$pluginDir = __DIR__ . '/../';
$pluginName = basename(dirname(__DIR__));
$pluginFolder = basename(dirname(dirname(__DIR__)));
require_once $pluginDir . '/vendor/autoload.php';
\TestHelper::Instance()->Loader()->registerNamespace('Shopware\\Plugins\\' . $pluginName, $pluginDir);
\TestHelper::Instance()->Loader()->registerNamespace('Shopware\\Plugin\\Debug', $pluginDir . '../../../Default/Core/Debug/');
\TestHelper::Instance()->Loader()->registerNamespace('Shopware\\Tests\\' . $pluginName, __DIR__ . '/');
Shopware()->Front()->setRequest(new Enlight_Controller_Request_RequestHttp());
开发者ID:wesolowski,项目名称:shopware-clockwork,代码行数:11,代码来源:Bootstrap.php

示例8:

<?php

require "./../../../../../../tests/Shopware/TestHelper.php";
$helper = \TestHelper::Instance();
$loader = $helper->Loader();
$pluginDir = __DIR__ . '/../';
$loader->registerNamespace('Shopware\\SwagMd5Reversed', $pluginDir);
开发者ID:shobcheye,项目名称:devdocs,代码行数:7,代码来源:Bootstrap.php


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