/** * building this with a data provider actually makes the test harder to read and to understand * * @test */ public function returnExtConfArrayTest() { $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'] = ['validArray' => ['data' => 'value'], 'validSerialized' => 'a:1:{s:5:"data2";s:13:"value as well";}', 'somethingInvalid' => 'a:2:{s:8:"data";s:1:"value";}']; $this->assertEquals(['data' => 'value'], $this->proxy->returnExtConfArray('validArray')); $this->assertEquals(['data2' => 'value as well'], $this->proxy->returnExtConfArray('validSerialized')); try { $this->proxy->returnExtConfArray('somethingInvalid'); } catch (\Exception $e) { $this->assertEquals(1473087238, $e->getCode()); } try { $this->proxy->returnExtConfArray('invalidExtensionKey'); } catch (\Exception $e) { $this->assertEquals(1473087212, $e->getCode()); } }
public function __construct() { $this->extensionConfiguration = \Tx_PtExtbase_Div::returnExtConfArray('pt_extbase'); $this->evaluateLogFilePath(); $this->evaluateExceptionDirectory(); $this->setLogLevelThresholdByExtensionConfigurationProperty('logLevelThreshold'); $this->setLogLevelThresholdByExtensionConfigurationProperty('emailLogLevelThreshold'); $this->evaluateEmailReceivers(); }
/** * @param string $extensionKey * @return array */ protected function loadExtensionSettings($extensionKey) { $settings = \Tx_PtExtbase_Div::returnExtConfArray($extensionKey); return $settings; }