<?php
//
// +---------------------------------------------------------------------------+
// | Nitro :: Tests :: Run Tests |
// +---------------------------------------------------------------------------+
// | Copyright (c) 2003-2006 June Systems BV |
// +---------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or modify it |
// | under the terms of the GNU Lesser General Public License as published by |
// | the Free Software Foundation; either version 2.1 of the License, or (at |
// | your option) any later version. |
// | |
// | This library is distributed in the hope that it will be useful, but |
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser |
// | General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public License |
// | along with this library; if not, write to the Free Software Foundation, |
// | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
// +---------------------------------------------------------------------------+
// | Authors: Siggi Oskarsson <hide@address.com> |
// +---------------------------------------------------------------------------+
//
// $Id: RunTests.php 227 2008-04-16 14:03:44Z oli $
//
require_once 'PHPUnit.php';
define('NITRO_PEAR_PATH', '/usr/local/lib/php/');
define('NITRO_PATH', str_replace('/Tests', '', dirname(__FILE__)).'/');
$testFiles = glob(NITRO_PATH.'Tests/Nitro/*.php');
foreach($testFiles AS $testFile) {
include_once $testFile;
$class = 'NitroTests_'.str_replace('/', '_', str_replace('.inc.php', '', basename($testFile)));
$suite = new PHPUnit_TestSuite($class);
$result = PHPUnit::run($suite);
print $result->toString();
}
?>