當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。