Skip to content
This repository has been archived by the owner on Feb 15, 2020. It is now read-only.

Commit

Permalink
- Updating tests settings
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Jan 2, 2017
1 parent b8dbb83 commit 6c32197
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

$file = __DIR__ . '/composer.json';
$content = file_get_contents($file);
$composer = json_decode($content, TRUE);
$composer = json_decode($content, TRUE);

$composer['require']['nette/application'] = $version;
$composer['require']['nette/di'] = $version;
Expand Down
3 changes: 3 additions & 0 deletions tests/IPubTests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage.dat
*.actual
*.expected
6 changes: 6 additions & 0 deletions tests/IPubTests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@
}

Tester\Environment::setup();
date_default_timezone_set('Europe/Prague');

// Create temporary directory
define('TEMP_DIR', __DIR__ . DS . '..' . DS . 'tmp' . DS . (isset($_SERVER['argv']) ? md5(serialize($_SERVER['argv'])) : getmypid()));
Tester\Helpers::purge(TEMP_DIR);
\Tracy\Debugger::$logDirectory = TEMP_DIR;

$_SERVER = array_intersect_key($_SERVER, array_flip(array(
'PHP_SELF', 'SCRIPT_NAME', 'SERVER_ADDR', 'SERVER_SOFTWARE', 'HTTP_HOST', 'DOCUMENT_ROOT', 'OS', 'argc', 'argv')));
$_SERVER['REQUEST_TIME'] = 1234567890;
$_ENV = $_GET = $_POST = array();

function id($val)
{
return $val;
Expand Down

0 comments on commit 6c32197

Please sign in to comment.