Updated the phpunit bootstrapper to initialize the environment.

This commit is contained in:
Robert Hafner 2013-12-05 12:13:25 -08:00
parent 6e6d66ed87
commit bdfb20f610

View File

@ -9,10 +9,22 @@
* file that was distributed with this source code.
*/
define('TESTING', true);
error_reporting(-1);
define('TESTING', true);
define('TEST_USER', 'testuser');
define('TEST_PASSWORD', 'applesauce');
if(getenv('TRAVIS'))
{
define('TESTING_ENVIRONMENT', 'TRAVIS');
define('TESTING_SERVER_IP', '127.0.0.1');
}else{
define('TESTING_ENVIRONMENT', 'VAGRANT');
define('TESTING_SERVER_IP', '172.31.1.2');
exec('/bin/bash ' . __DIR__ . '/SetupEnvironment.sh');
}
$filename = __DIR__ .'/../vendor/autoload.php';
if (!file_exists($filename)) {
@ -25,5 +37,4 @@ if (!file_exists($filename)) {
}else{
$loader = require_once $filename;
$loader->add('Fetch\\Test', __DIR__);
}
}