Пример #1
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']);
 }
 public function tearDown()
 {
     // re-assign log object
     Kohana::$log = $this->_log_object;
     parent::tearDown();
 }
Пример #3
0
 public function setUp()
 {
     parent::setUp();
     $this->repository = $this->getMockBuilder('Ushahidi_Repository_PostValue')->setMethods(['selectOne', 'selectQuery', 'getTable'])->disableOriginalConstructor()->getMock();
     $this->postvalue = $this->getMock('Ushahidi\\Core\\Entity\\PostValue');
 }
Пример #4
0
 /**
  * Sets up a test route for caching
  *
  * @return void
  */
 public function setUp()
 {
     Route::set('welcome', 'welcome/index')->defaults(array('controller' => 'welcome', 'action' => 'index'));
     parent::setUp();
 }
Пример #5
0
 public function setUp()
 {
     parent::setUp();
     Kohana::$config->load('url')->set('trusted_hosts', array('localhost'));
 }
Пример #6
0
 /**
  * Sets up the test enviroment
  */
 function setUp()
 {
     parent::setUp();
     Text::alternate();
 }
 public function tearDown()
 {
     parent::tearDown();
     $this->cleanCacheDir();
 }
Пример #8
0
 /**
  * Tear down environment
  */
 public function tearDown()
 {
     parent::tearDown();
     setlocale(LC_ALL, $this->default_locale);
 }
Пример #9
0
 /**
  * Tears down the environment
  */
 public function tearDown()
 {
     parent::tearDown();
     Cookie::$salt = NULL;
 }
Пример #10
0
 public function setUp()
 {
     parent::setUp();
     // $this->markTestSkipped("Message");
 }
Пример #11
0
 /**
  * Set up by resetting hooks.
  */
 public function setUp()
 {
     parent::setUp();
     Hooks::reset();
 }
Пример #12
0
 public function tearDown()
 {
     parent::tearDown();
     Database::instance()->rollback();
 }
 public function setUp()
 {
     parent::setUp();
     Kohana_CookieTest_TestableCookie::$_mock_cookies_set = array();
     $this->setEnvironment(array('Cookie::$salt' => 'some-random-salt', 'HTTP_USER_AGENT' => 'cli'));
 }
Пример #14
0
 public function setUp()
 {
     $this->environmentDefault = array('asset-merger.merge' => TRUE, 'asset-merger.docroot' => $this->data_dir(), 'asset-merger.folder' => 'assets', 'asset-merger.load_paths.js' => $this->data_dir() . 'js' . DIRECTORY_SEPARATOR, 'asset-merger.load_paths.css' => $this->data_dir() . 'css' . DIRECTORY_SEPARATOR);
     parent::setUp();
 }
Пример #15
0
 /**
  * Restores original timezone after testing.
  */
 public function tearDown()
 {
     date_default_timezone_set($this->_original_timezone);
     parent::tearDown();
 }
Пример #16
0
 public function setUp()
 {
     parent::setUp();
     Kohana::$config->load('url')->set('trusted_hosts', array('www\\.kohanaframework\\.org'));
 }
Пример #17
0
 public function tearDown()
 {
     date_default_timezone_set($this->_original_timezone);
     setlocale(LC_ALL, $this->default_locale);
     parent::tearDown();
 }
Пример #18
0
 public function setUp()
 {
     parent::setUp();
     $this->old_modules = Kohana::modules();
 }
Пример #19
0
 /**
  * Verify the dompdf state as a precondition on every test
  */
 public function setUp()
 {
     parent::setUp();
     $this->verify_dompdf_state();
 }
Пример #20
0
 public function tearDown()
 {
     Request::$initial = $this->_initial_request;
     parent::tearDown();
 }
Пример #21
0
 public function setUp()
 {
     parent::setUp();
     Kohana::$config->load('url')->set('trusted_hosts', array('www\\.example\\.com'));
 }
 public function tearDown()
 {
     // @codingStandardsIgnoreEnd
     Request::$initial = $this->_initial_request;
     parent::tearDown();
 }
Пример #23
0
 public function tearDown()
 {
     parent::tearDown();
 }