} if (!defined('PHPRACK_PATH')) { define('PHPRACK_PATH', dirname(__FILE__)); } /** * @see phpRack_Runner */ require_once PHPRACK_PATH . '/Runner.php'; $runner = new phpRack_Runner($phpRackConfig); /** * @see phpRack_View */ require_once PHPRACK_PATH . '/View.php'; // if it's CLI environment - just show a full test report if ($runner->isCliEnvironment()) { throw new Exception($runner->runSuite()); } // check whether SSL connection is mandatory? if (!$runner->isEnoughSecurityLevel()) { throw new Exception('You must use SSL protocol to run integration tests'); } /** * Using this tag in GET URL we can get a summary report * in plain text format. */ if (array_key_exists('suite', $_GET)) { header('Content-Type: text/plain'); if (!$runner->getAuth()->isAuthenticated()) { throw new Exception('Access denied'); } throw new Exception($runner->runSuite());