2011-02-28 22:30:22 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
error_reporting(E_ALL | E_STRICT);
|
|
|
|
|
2012-01-14 13:57:05 -06:00
|
|
|
// Ensure that composer has installed all dependencies
|
2012-06-04 12:17:20 -07:00
|
|
|
if (!file_exists(dirname(__DIR__) . '/composer.lock')) {
|
2012-04-16 15:13:53 -07:00
|
|
|
die("Dependencies must be installed using composer:\n\nphp composer.phar install --dev\n\n"
|
|
|
|
. "See http://getcomposer.org for help with installing composer\n");
|
2012-01-14 13:57:05 -06:00
|
|
|
}
|
|
|
|
|
2011-02-28 22:30:22 -06:00
|
|
|
require_once 'PHPUnit/TextUI/TestRunner.php';
|
|
|
|
|
2012-06-14 09:49:05 -07:00
|
|
|
// Include the phar files if testing against the phars
|
2012-04-14 18:43:34 -07:00
|
|
|
if (get_cfg_var('guzzle_phar')) {
|
|
|
|
require get_cfg_var('guzzle_phar');
|
|
|
|
}
|
|
|
|
|
2012-01-14 13:57:05 -06:00
|
|
|
// Include the composer autoloader
|
2012-07-22 15:05:51 -07:00
|
|
|
$autoloader = require_once dirname(__DIR__) . '/vendor/autoload.php';
|
2011-02-28 22:30:22 -06:00
|
|
|
|
2012-01-14 13:57:05 -06:00
|
|
|
// Add the services file to the default service builder
|
2012-06-04 12:17:20 -07:00
|
|
|
$servicesFile = __DIR__ . '/Guzzle/Tests/TestData/services/services.xml';
|
2012-05-13 17:20:26 -07:00
|
|
|
Guzzle\Tests\GuzzleTestCase::setServiceBuilder(Guzzle\Service\Builder\ServiceBuilder::factory($servicesFile));
|
2012-04-14 19:04:37 -07:00
|
|
|
|
|
|
|
// Modify the include path so that it can find the Zend Framework
|
|
|
|
$paths = array('vendor/zend/zend-cache1', 'vendor/zend/zend-log1');
|
|
|
|
set_include_path(implode(PATH_SEPARATOR, array_map(function($path) {
|
2012-06-04 12:17:20 -07:00
|
|
|
return __DIR__ . '/../' . $path;
|
2012-04-21 00:23:07 -07:00
|
|
|
}, $paths)) . PATH_SEPARATOR . get_include_path());
|