Source for file ethna_run_test.php
Documentation is available at ethna_run_test.php
* @author Kazuhiro Hosoi <hosoi@gree.co.jp>
* @license http://www.opensource.org/licenses/bsd-license.php The BSD License
/** Ethnaインストールルートディレクトリ */
define('ETHNA_INSTALL_BASE', dirname(dirname(__FILE__
)));
$symlink_filename =
null;
/** シンボリックリンクをインストールディレクトリの親に張る */
/** symlink 関数は 5.3.0 以前では Windows 上で動作しない */
/** が、Cygwinでテストするため問題はない。 */
echo
"Base dir 'Ethna' exists and it's not ETHNA_INSTALL_BASE.\n";
/** include_pathの設定(このtest runnerがあるディレクトリを追加) */
//ini_set('include_path', realpath(ETHNA_INSTALL_BASE . '/class') . PATH_SEPARATOR . ini_get('include_path'));
require_once 'Ethna/Ethna.php';
require_once 'simpletest/unit_tester.php';
require_once 'simpletest/reporter.php';
require_once $test_dir .
'/TextDetailReporter.php';
require_once $test_dir .
'/Ethna_UnitTestBase.php';
$test =
&new GroupTest('Ethna All tests');
require_once 'Ethna/class/Ethna_Getopt.php';
$args =
$opt->readPHPArgv();
list
($args, $opts) =
$opt->getopt($args, '', array());
foreach ($file_list as $file) {
$test->addTestFile($file);
$test->run(new TextDetailReporter());
if ($symlink_filename !==
null &&
is_link($symlink_filename)) {
* @param string $dir_path
while($file_path =
readdir($dir)) {
$full_path =
$dir_path .
'/'.
$file_path;
if (preg_match('/^(Ethna_)(.*)(_Test.php)$/',$file_path,$matches)) {
$file_list[] =
$full_path;
// サブディレクトリがある場合は,再帰的に読み込む.
Documentation generated on Fri, 11 Nov 2011 04:00:50 +0900 by phpDocumentor 1.4.3