wsTests.php 582 Bytes
<?php

if (php_sapi_name() !='cli') die("This script can be only executed from command line");

require_once("config.php");
set_include_path(get_include_path() . PATH_SEPARATOR . "WebServices/Tests/");

require_once("Base/TestsSuite.php");

define("BASE_URL","http://127.0.0.1");

$suite = new TestsSuite();
$suite->init('WebServices/Tests/Suite');
$results = $suite->run();

$error = FALSE;
foreach ($results as $result) {
	if (!$result['status']['success']) {
		echo "[ERROR] ".$result['name']." - ".$result['status']['message'].PHP_EOL;
		$error = TRUE;
	}
}

exit ($error);

?>