/** * @covers Helper_Modules::_getModulesAnalize */ public function testGetModulesAnalizeTwo() { modConfig::setParameter("start", true); oxTestModules::addFunction('moduleManager', 'getModuleContentClass', '{ return true; }'); oxTestModules::addFunction('moduleManagerAnalize', 'setAnalize', '{ return true; }'); $oTestObj = $this->getProxyClass('Helper_Modules'); $this->assertNull($oTestObj->UNITgetModulesAnalize()); }
/** * Testing the creating of a Barzahlen_Api object. */ public function testGetBarzahlenApi() { modConfig::setParameter("oxid", "a6f9bc61ce7aec5dabb7600636f5ce1d"); $oView = $this->getProxyClass('bz_barzahlen_payment_gateway'); $oApi = $oView->_getBarzahlenApi(0); $this->assertAttributeEquals(SHOPID, '_shopId', $oApi); $this->assertAttributeEquals(PAYMENTKEY, '_paymentKey', $oApi); $this->assertAttributeEquals('de', '_language', $oApi); $this->assertAttributeEquals(true, '_sandbox', $oApi); $this->assertAttributeEquals(0, '_madeAttempts', $oApi); }
/** * @covers Chromephp_Admin_Main::_getParams */ public function testGetParamsActivDebagAxFilter() { modConfig::setParameter("editval", array('debugActive' => '1', 'sendData' => '2', 'sAuthorizationText' => '', 'sqlCheck' => '2', 'info' => '1')); modConfig::setParameter("filter", array('usermodel' => '0', 'backtrace' => '0', 'search' => '1', 'sSearchText' => 'test1')); modConfig::setParameter("sSerchMore", array(0 => 'test2', 1 => 'test3')); $oTestClass = $this->getProxyClass('Chromephp_Admin_Main'); $aReturn = array('debugActive' => '1', 'sendData' => '2', 'sAuthorizationText' => '', 'sqlCheck' => '2', 'info' => '1', 'filter' => array('usermodel' => '0', 'backtrace' => '0', 'search' => '1', 'sSearchText' => 'test1#test2#test3', 'moreFilter' => 1)); $this->assertSame($oTestClass->UNITgetParams(), $aReturn); }
/** * @covers chromephp_admin_perform::startPerformTest */ public function testStartPerformTest() { oxTestModules::addFunction('testPerformance', 'changePerformFile', '{ return true; }'); $aArrayTestSufix = array(1 => 'start', 2 => 'list', 3 => 'details'); $sTestUrl = 'http://www.test.com/'; $sTestComment = 'Test Comment'; $iIterator = 3; $aArrayTest = array(); for ($iTest = 1; $iTest <= $iIterator; $iTest++) { $aArrayTest[$iTest] = $sTestUrl; } modConfig::setParameter("aUrls", $aArrayTest); modConfig::setParameter("comment", $sTestComment); $oTestClass = new chromephp_admin_perform(); $this->assertNull($oTestClass->startPerformTest()); $aViewData = $oTestClass->getViewData(); $aResultLinks = $aViewData['aUrlsIframe']; for ($iTest = 1; $iTest <= $iIterator; $iTest++) { $this->assertSame($aResultLinks[$iTest], $sTestUrl . '?test=' . $aArrayTestSufix[$iTest], 'Result Url is not a same'); } $this->assertSame(3, count($aResultLinks), 'Only 3 Link are allowed'); $this->assertTrue($aViewData['bPerform'], 'bPerform is not a True'); $this->assertSame($aViewData['comment'], $sTestComment, 'Coment ist no a same'); }
/** * @covers chromephp_admin_file::save */ public function testSave() { modConfig::setParameter("editval", array('test' => 6, 'test2' => 6)); $oView = new chromephp_admin_file(); $this->assertNull($oView->save()); }