formatting

This commit is contained in:
thefosk
2014-03-18 11:15:38 -07:00
parent e6682a5ad1
commit 2fb13154e2
5 changed files with 654 additions and 625 deletions

View File

@@ -1,23 +1,20 @@
<?php
echo "Running the Unirest-PHP bindings test suite.\n".
"If you're trying to use the Unirest-PHP bindings you'll probably want ".
"to require('lib/Unirest.php'); instead of this file\n";
echo "Running the Unirest-PHP bindings test suite.\n" . "If you're trying to use the Unirest-PHP bindings you'll probably want " . "to require('lib/Unirest.php'); instead of this file\n";
$ok = @include_once(dirname(__FILE__).'/simpletest/autorun.php');
$ok = @include_once(dirname(__FILE__) . '/simpletest/autorun.php');
if (!$ok) {
$ok = @include_once(dirname(__FILE__).'/../vendor/vierbergenlars/simpletest/autorun.php');
$ok = @include_once(dirname(__FILE__) . '/../vendor/vierbergenlars/simpletest/autorun.php');
}
if (!$ok) {
echo "MISSING DEPENDENCY: The Unirest-PHP test cases depend on SimpleTest. ".
"Download it at <http://www.simpletest.org/>, and either install it ".
"in your PHP include_path or put it in the test/ directory.\n";
exit(1);
echo "MISSING DEPENDENCY: The Unirest-PHP test cases depend on SimpleTest. " . "Download it at <http://www.simpletest.org/>, and either install it " . "in your PHP include_path or put it in the test/ directory.\n";
exit(1);
}
// Throw an exception on any error
function exception_error_handler($errno, $errstr, $errfile, $errline) {
throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
function exception_error_handler($errno, $errstr, $errfile, $errline)
{
throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
}
set_error_handler('exception_error_handler');