From bdfb20f6108d7d6196c1f5d3f19dc4aa8766929e Mon Sep 17 00:00:00 2001 From: Robert Hafner Date: Thu, 5 Dec 2013 12:13:25 -0800 Subject: [PATCH] Updated the phpunit bootstrapper to initialize the environment. --- tests/bootstrap.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 418e2e4..53f9d61 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -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__); -} - +} \ No newline at end of file