/** * Ensures we have a consistant timezone for testing. */ public function setUp() { parent::setUp(); $this->_original_timezone = date_default_timezone_get(); date_default_timezone_set('America/Chicago'); }
public function setUp() { parent::setUp(); $this->config = $this->getMockBuilder('LogReader_Config')->setConstructorArgs(array(array()))->getMock(); $this->config->expects($this->any())->method('get_store')->will($this->returnValue(array('type' => 'File', 'path' => APPPATH . 'logs'))); $this->store = $this->getMockBuilder('LogReader_Store')->setConstructorArgs(array($this->config->get_store()))->getMockForAbstractClass(); $this->logreader = new LogReader($this->config, $this->store); }
/** * Setup the enviroment for each test * * PHPUnit automatically backups up & restores global variables */ public function setUp() { parent::setUp(); $_SERVER['argv'] = array('index.php'); foreach ($this->options as $option => $value) { if (is_string($option)) { $_SERVER['argv'][] = $option . '=' . $value; } else { $_SERVER['argv'][] = $value; } } $_SERVER['argc'] = count($_SERVER['argv']); }
/** * Sets up the test enviroment */ public function setUp() { parent::setUp(); Text::alternate(); }
public function setUp() { parent::setUp(); $this->config = new LogReader_Config(array('limit' => 40, 'auto_refresh_interval' => 5, 'store' => array('type' => 'File', 'path' => APPPATH . 'logs'), 'route' => 'logreader', 'static_route' => 'logreader/media', 'tester' => FALSE, 'authentication' => TRUE, 'users' => array(array('username' => 'admin', 'password' => '123456')))); }
/** * Remove all caches */ public function setUp() { parent::setUp(); $this->clean_cache_dir(); }
/** * SetUp test enviroment */ public function setUp() { parent::setUp(); setlocale(LC_ALL, 'English'); }
/** * Remove all caches */ public function setUp() { parent::setUp(); $this->cleanCacheDir(); }
public function setUp() { parent::setUp(); $this->_nav_simple = self::_get_test_config(); $this->_menu = $this->_build_test_menu(); }
public function setUp() { parent::setUp(); $this->store = new LogReader_Store_File(array('type' => 'File', 'path' => realpath(__DIR__ . '/../../../test_data/logs'))); }
public function setUp() { parent::setUp(); $this->setEnvironment(array('Kohana::$base_url' => 'http://example.com/')); }