public function __construct() { $this->helper = \TestHelper::Instance(); $this->initPluginNamespaces(); $this->initTestNamespace(); $this->initServiceContainerSubscriber(); }
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(); }
public function setUp() { parent::setUp(); $helper = \TestHelper::Instance(); $loader = $helper->Loader(); $pluginDir = getcwd() . '/../'; $loader->registerNamespace('Shopware\\SwagModelPlugin', $pluginDir); }
/** * */ 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'); }
/** * 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'))); }
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(); }
<?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());
<?php require "./../../../../../../tests/Shopware/TestHelper.php"; $helper = \TestHelper::Instance(); $loader = $helper->Loader(); $pluginDir = __DIR__ . '/../'; $loader->registerNamespace('Shopware\\SwagMd5Reversed', $pluginDir);