/** * Constructor * * Initialize environment, root path, and configuration. * * @param string $env * @param string|null $root * @return void */ public function __construct($root = null) { if (null === $root) { $root = realpath(dirname(__FILE__) . '/../'); } $this->_root = $root; Zend_SetupInit::setupInit(); $this->_front = Zend_Controller_Front::getInstance(); $this->_initErrorReporting(); $tmz = Zend_ConfigSettings::setupTimeZone(); date_default_timezone_set($tmz); }
/** * Checks that if test data is setup, that * it is in the expected format, also sets * the timezone ready for later. * * @access public * */ public function __construct() { if (null !== $this->_fixtures) { foreach ($this->_fixtures as $fixture) { if (!is_array($fixture)) { throw new Zend_Exception('Fixture data in unexpected format, should be an array of arrays'); } } } $tmz = Zend_ConfigSettings::setupTimeZone(); date_default_timezone_set($tmz); }