複数ネームスペースを可能に
This commit is contained in:
10
tester.php
10
tester.php
@@ -8,15 +8,17 @@ if (!CURL_ENABLED) define('ACTIVITYPUB_ENABLED', false);
|
||||
mb_internal_encoding('UTF-8');
|
||||
header('Content-Type: text/plain; charset=UTF-8');
|
||||
|
||||
$testDir = ROOT.'/src/Site/Test';
|
||||
$testFiles = glob($testDir.'/*.php');
|
||||
$testDirs = [ROOT.'/src/Site/Test', ROOT.'/src/Std/Test'];
|
||||
$testFiles = [];
|
||||
foreach ($testDirs as $d) $testFiles[] = glob($d.'/*.php');
|
||||
$testFiles = array_merge(...$testFiles);
|
||||
|
||||
if (empty($testFiles)) {
|
||||
echo "テストファイルは{$testDir}にありません\n";
|
||||
echo "テストファイルではありません\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
echo "{$testDir}にある".count($testFiles)."個テストファイルを実行中:\n";
|
||||
echo count($testFiles)."個テストファイルを実行中:\n";
|
||||
echo "------------------------------------------------\n";
|
||||
|
||||
$totalFiles = 0;
|
||||
|
||||
Reference in New Issue
Block a user