Example #1
0
	/**
	 * 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);
 }
Example #3
0
 /**
  * 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']);
 }
Example #4
0
 /**
  * Sets up the test enviroment
  */
 public function setUp()
 {
     parent::setUp();
     Text::alternate();
 }
Example #5
0
 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'))));
 }
Example #6
0
 /**
  * Remove all caches
  */
 public function setUp()
 {
     parent::setUp();
     $this->clean_cache_dir();
 }
Example #7
0
 /**
  * SetUp test enviroment
  */
 public function setUp()
 {
     parent::setUp();
     setlocale(LC_ALL, 'English');
 }
Example #8
0
 /**
  * Remove all caches
  */
 public function setUp()
 {
     parent::setUp();
     $this->cleanCacheDir();
 }
Example #9
0
 public function setUp()
 {
     parent::setUp();
     $this->_nav_simple = self::_get_test_config();
     $this->_menu = $this->_build_test_menu();
 }
Example #10
0
 public function setUp()
 {
     parent::setUp();
     $this->store = new LogReader_Store_File(array('type' => 'File', 'path' => realpath(__DIR__ . '/../../../test_data/logs')));
 }
Example #11
0
 public function setUp()
 {
     parent::setUp();
     $this->setEnvironment(array('Kohana::$base_url' => 'http://example.com/'));
 }