public function setUp() { $app = $this->getMock('Enlight_Application', null, array("TestApp"), '', false); $this->manager = $this->getMock('Enlight_Plugin_PluginManager', null, array($app)); $this->manager->setApplication($app); parent::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(); $this->em = Shopware()->Models(); $this->repo = Shopware()->Models()->getRepository('Shopware\\Models\\Order\\Order'); Shopware()->Bootstrap()->registerResource('Auth', new ZendAuthMock()); }
protected function setUp() { parent::setUp(); $this->mediaService = Shopware()->Container()->get('shopware_media.media_service'); $this->testData = ['key' => 'myKey', 'name' => 'name', 'people' => ['great guy', 'greater guy', 'grumpy guy']]; $this->testFileSize = strlen(json_encode($this->testData)); }
protected function setUp() { parent::setUp(); Shopware()->Models()->clear(); $this->resource = $this->createResource(); $this->resource->setManager(Shopware()->Models()); }
/** * Tests set up method */ public function setUp() { parent::setUp(); $app = Enlight_Application::Instance(); $app->Bootstrap()->resetResource('Session')->resetResource('Auth'); $this->reset(); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); Shopware()->Models()->clear(); $this->resource = $this->getMockForAbstractClass('\\Shopware\\Components\\Api\\Resource\\Resource'); $this->resource->setManager(Shopware()->Models()); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->hasher = new \Shopware\Components\Password\Encoder\Bcrypt(array('cost' => 4)); if (!$this->hasher->isCompatible()) { $this->markTestSkipped('Brypt Hasher is not compatible with current system.'); } }
/** * Tests set up method */ public function setUp() { parent::setUp(); $this->reset(); Enlight_Application::Instance()->Bootstrap()->resetResource('Session')->resetResource('Auth'); //$this->Front() // ->setRequest($this->Request()) // ->setResponse($this->Response()); }
/** * Set up the test case */ public function setUp() { parent::setUp(); $path = Enlight_TestHelper::Instance()->TestPath('TempFiles'); $this->adapterTester = new Enlight_Config_Adapter_File(array('configType' => 'ini', 'configDir' => $path)); $this->configTester = new Enlight_Config('test', array('adapter' => $this->adapterTester, 'section' => 'test')); $this->configTester->setAllowModifications()->set('test', true)->setReadOnly(); $this->configTester->write(); }
/** * Set up the test case */ public function setUp() { $this->jobData['next'] = new Zend_Date($this->jobData['next']); $this->jobData['start'] = new Zend_Date($this->jobData['start']); $this->jobData['end'] = new Zend_Date($this->jobData['end']); $this->job = new Enlight_Components_Cron_Job($this->jobData); $this->job->setData(unserialize('a:2:{s:5:"count";i:64;s:17:"articledetailsIDs";a:64:{i:0;i:2;i:1;i:3;i:2;i:4;i:3;i:5;i:4;i:6;i:5;i:8;i:6;i:9;i:7;i:10;i:8;i:14;i:9;i:16;i:10;i:17;i:11;i:19;i:12;i:20;i:13;i:42;i:14;i:51;i:15;i:52;i:16;i:53;i:17;i:55;i:18;i:73;i:19;i:76;i:20;i:106;i:21;i:107;i:22;i:121;i:23;i:141;i:24;i:152;i:25;i:153;i:26;i:157;i:27;i:250;i:28;i:450;i:29;i:538;i:30;i:687;i:31;i:708;i:32;i:1049;i:33;i:1142;i:34;i:1151;i:35;i:1185;i:36;i:1186;i:37;i:1247;i:38;i:1395;i:39;i:1413;i:40;i:1420;i:41;i:1594;i:42;i:1648;i:43;i:1977;i:44;i:2194;i:45;i:2285;i:46;i:2374;i:47;i:2647;i:48;i:2662;i:49;i:2682;i:50;i:2732;i:51;i:2888;i:52;i:2889;i:53;i:2892;i:54;i:2928;i:55;i:3598;i:56;i:3624;i:57;i:3663;i:58;i:3827;i:59;i:3859;i:60;i:5957;i:61;i:6199;i:62;i:6596;i:63;i:6664;}}')); parent::setUp(); }
protected function setUp() { $this->helper = new Helper(); Shopware()->Db()->query("DELETE FROM s_categories WHERE description LIKE 'Foo%' AND parent = 3"); $this->module = new \sCategories(); $this->module->baseId = 3; $this->module->customerGroupId = 1; parent::setUp(); }
/** * Set up the test case */ public function setUp() { parent::setUp(); $tempDir = Enlight_TestHelper::Instance()->TestPath('TempFiles'); $dataDir = Enlight_TestHelper::Instance()->TestPath('DataSets'); $this->manager = new Enlight_Template_Manager(); $this->manager->setCompileDir($tempDir); $this->manager->setCompileId('resource'); $this->manager->setTemplateDir(array($dataDir . 'Template/parent1/', $dataDir . 'Template/parent2/')); }
/** * Test set up method */ protected function setUp() { parent::setUp(); $this->module = Shopware()->Modules()->Articles(); $this->module->sSYSTEM->sSESSION_ID = uniqid(); $this->module->sDeleteComparisons(); $sql = 'SELECT `id` FROM `s_articles` WHERE `active` =1'; $sql = Shopware()->Db()->limit($sql, 5); $this->testArticleIds = Shopware()->Db()->fetchCol($sql); }
/** * Set up the test case */ public function setUp() { parent::setUp(); $tempDir = Enlight_TestHelper::Instance()->TestPath('TempFiles'); $adapter = new Enlight_Config_Adapter_File(array('configType' => 'ini', 'configDir' => $tempDir, 'namePrefix' => 'snippet_')); $this->manager = new Enlight_Components_Snippet_Manager($adapter); $this->engine = new Enlight_Template_Manager(); $this->engine->setCompileDir($tempDir); $this->engine->setCompileId('snippet'); $this->engine->clearCompiledTemplate(null, 'snippet'); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $stringCompiler = new Shopware_Components_StringCompiler(Shopware()->Template()); $manager = $this->getMockBuilder('Shopware\\Components\\Model\\ModelManager')->disableOriginalConstructor()->getMock(); $manager->expects($this->any())->method('getRepository')->will($this->returnSelf()); $manager->expects($this->any())->method('findOneBy')->will($this->returnValue(false)); $this->mail = new Shopware_Components_TemplateMail(); $this->mail->setShop(Shopware()->Shop()); $this->mail->setModelManager($manager); $this->mail->setStringCompiler($stringCompiler); }
/** * Set up the test case */ public function setUp() { parent::setUp(); $dir = Enlight_TestHelper::Instance()->TestPath('TempFiles'); $this->db = Enlight_Components_Db::factory('PDO_SQLITE', array('dbname' => $dir . 'config.db')); $this->db->exec(' CREATE TABLE IF NOT EXISTS `config_test` ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `section` varchar(255) DEFAULT NULL, `name` varchar(255) NOT NULL, `value` text NOT NULL, `created` datetime NOT NULL, `updated` datetime NOT NULL ); '); }
/** * Set up the test case */ public function setUp() { parent::setUp(); $dir = Enlight_TestHelper::Instance()->TestPath('TempFiles'); $this->db = Enlight_Components_Db::factory('PDO_SQLITE', array('dbname' => Enlight_TestHelper::Instance()->TestPath('TempFiles') . 'auth.db')); $this->lockeduntilColumn = 'lockeduntil'; $this->createDb($this->lockeduntilColumn); $this->createDefaultUser($this->lockeduntilColumn); // Needed to simulate web environment - otherwise we would get a nasty notice. $GLOBALS['_SESSION'] = array(); Zend_Session::$_unitTestEnabled = true; Zend_Session::start(); $this->auth = Enlight_Components_Auth::getInstance(); $this->authAdapter = new Enlight_Components_Auth_Adapter_DbTable($this->db, 'test_auth', 'username', 'password'); $this->authAdapter->setIdentityColumn('username')->setCredentialColumn('password')->setExpiryColumn('lastlogin')->setSessionIdColumn('sessionID')->setSessionId('s4inr04o6apmclk7u88qau4r57'); $storage = new Zend_Auth_Storage_Session('Enlight', 'Auth'); $this->auth->setAdapter($this->authAdapter); $this->assertInstanceOf('Enlight_Components_Auth_Adapter_DbTable', $this->auth->getAdapter()); $this->auth->setStorage($storage); }
/** * Set up the test case */ public function setUp() { parent::setUp(); $dir = Enlight_TestHelper::Instance()->TestPath('TempFiles'); $this->db = Enlight_Components_Db::factory('PDO_SQLITE', array('dbname' => $dir . 'menu.db')); $this->db->exec(' DROP TABLE IF EXISTS `menu_test`; CREATE TABLE IF NOT EXISTS `menu_test` ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `parent` INTEGER NOT NULL, `active` INTEGER(1) NOT NULL, `label` varchar(255) NOT NULL ); DROP TABLE IF EXISTS `menu_test2`; CREATE TABLE IF NOT EXISTS `menu_test2` ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `parent` INTEGER NOT NULL, `active` INTEGER(1) NOT NULL, `name` varchar(255) NOT NULL ); '); $this->adapter = new Enlight_Components_Menu_Adapter_DbTable(array('db' => $this->db, 'name' => 'menu_test')); }
protected function setUp() { $this->helper = new Helper(); $this->converter = new Converter(); parent::setUp(); }
public function setUp() { $this->namespace = $this->getMock('Enlight_Plugin_Namespace', null, array('testNamespace')); parent::setUp(); }
/** * Set up the test case */ public function setUp() { parent::setUp(); $dir = Enlight_TestHelper::Instance()->TestPath('TempFiles'); $this->adapter = new Enlight_Config_Adapter_File(array('configType' => 'ini', 'configDir' => $dir)); }
/** * Set up the test case */ public function setUp() { parent::setUp(); }
/** * Test set up method */ protected function setUp() { parent::setUp(); $this->module = Shopware()->Modules()->Articles(); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->em = Shopware()->Models(); $this->repo = Shopware()->Models()->getRepository('Shopware\\Models\\Mail\\Mail'); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->compiler = new Shopware_Components_StringCompiler(Shopware()->Template()); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->hasher = new \Shopware\Components\Password\Encoder\Sha256(array('iterations' => 2, 'salt_len' => 22)); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. * @return void */ public function setUp() { $manager = $this->getMock('Enlight_Template_Manager', null, array()); $this->view = $this->getMock('Enlight_View_Default', null, array($manager)); parent::setUp(); }
public function setUp() { $collection = $this->getMock('Enlight_Plugin_PluginCollection'); $this->bootstrap = $this->getMock('Enlight_Plugin_Bootstrap', null, array('testBootstrap', $collection)); parent::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(); $this->acl = Shopware()->Acl(); }