2012-06-11 11:06:19 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
2012-06-11 11:39:12 +04:00
|
|
|
* This file is part of the Fetch library.
|
2012-06-11 11:06:19 +04:00
|
|
|
*
|
|
|
|
* (c) Robert Hafner <tedivm@tedivm.com>
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
2013-12-06 00:13:25 +04:00
|
|
|
error_reporting(-1);
|
|
|
|
|
2012-06-11 11:06:19 +04:00
|
|
|
define('TESTING', true);
|
2013-12-06 00:13:25 +04:00
|
|
|
define('TEST_USER', 'testuser');
|
|
|
|
define('TEST_PASSWORD', 'applesauce');
|
2014-02-27 12:12:28 +04:00
|
|
|
|
2014-02-27 12:11:19 +04:00
|
|
|
date_default_timezone_set('UTC');
|
2012-06-11 11:06:19 +04:00
|
|
|
|
2014-04-16 11:35:51 +04:00
|
|
|
if (getenv('TRAVIS')) {
|
2013-12-06 00:13:25 +04:00
|
|
|
define('TESTING_ENVIRONMENT', 'TRAVIS');
|
2014-02-27 23:47:17 +04:00
|
|
|
define('TESTING_SERVER_HOST', '127.0.0.1');
|
2014-04-16 11:35:51 +04:00
|
|
|
} else {
|
2013-12-06 00:13:25 +04:00
|
|
|
define('TESTING_ENVIRONMENT', 'VAGRANT');
|
2014-02-27 23:47:17 +04:00
|
|
|
define('TESTING_SERVER_HOST', '172.31.1.2');
|
2013-12-06 00:13:25 +04:00
|
|
|
}
|
2012-06-11 11:06:19 +04:00
|
|
|
|
2013-12-05 11:34:08 +04:00
|
|
|
$filename = __DIR__ .'/../vendor/autoload.php';
|
|
|
|
|
|
|
|
if (!file_exists($filename)) {
|
|
|
|
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" . PHP_EOL;
|
|
|
|
echo " You need to execute `composer install` before running the tests. " . PHP_EOL;
|
|
|
|
echo " Vendors are required for complete test execution. " . PHP_EOL;
|
|
|
|
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" . PHP_EOL . PHP_EOL;
|
|
|
|
$filename = __DIR__ .'/../autoload.php';
|
|
|
|
require_once $filename;
|
2014-04-16 11:35:51 +04:00
|
|
|
} else {
|
2014-04-20 09:01:22 +04:00
|
|
|
$loader = require $filename;
|
2013-12-05 11:34:08 +04:00
|
|
|
$loader->add('Fetch\\Test', __DIR__);
|
2014-04-16 11:28:38 +04:00
|
|
|
}
|