/** * Constructor swaps the SecurityConfiguration currently in use with one which * contains custom IDS events designed specifically for this UnitTestCase. */ protected function setUp() { $this->_restoreSecCon = ESAPI::getSecurityConfiguration(); ESAPI::setSecurityConfiguration(null); // Use a custom properties file. $sc = ESAPI::getSecurityConfiguration(__DIR__ . '/../testresources/ESAPI_IDS_Tests.xml'); $this->_logFileLoc = getLogFileLoc(); $this->_logDateFormat = $sc->getLogFileDateFormat(); }
/** * Constructor swaps the SecurityConfiguration currently in use with one which * contains custom IDS events designed specifically for this UnitTestCase. * * @return null */ function __construct() { global $ESAPI; if (!isset($ESAPI)) { $ESAPI = new ESAPI(dirname(__FILE__) . '/../testresources/ESAPI.xml'); } $this->_restoreSecCon = ESAPI::getSecurityConfiguration(); ESAPI::setSecurityConfiguration(null); // Use a custom properties file. $sc = ESAPI::getSecurityConfiguration(dirname(__FILE__) . '/../testresources/ESAPI_IDS_Tests.xml'); $this->_logFileLoc = getLogFileLoc(); $this->_logDateFormat = $sc->getLogFileDateFormat(); }
protected function setUp() { $this->logFileLoc = getLogFileLoc(); $this->testLogger = ESAPI::getAuditor(__CLASS__); $this->testLogger->setLevel(Auditor::ALL); }
function __construct() { ESAPI::getEncoder(); $this->logFileLoc = getLogFileLoc(); }