#!/usr/bin/env php
<?php
/**
 * Wrapper script that runs all unit and itegration tests in the project.
 *
 * PHP.Gt (http://php.gt)
 * @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
 * @license http://www.opensource.org/licenses/mit-license.php MIT
 */
chdir(__DIR__);
$exitCode = 0;
foreach (["Unit/run", "Acceptance/run"] as $path) {
	system($path, $exitCode);
	if($exitCode !== 0) {
		exit($exitCode);
	}
}

echo "\n\nALL TESTS PASSED SUCCESSFULLY\n\n";
exit($exitCode);