initial commit
This commit is contained in:
commit
5ebc506921
975 changed files with 154341 additions and 0 deletions
33
tests/run.php
Normal file
33
tests/run.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
define('Garradin\WWW_URI', '/');
|
||||
define('Garradin\WWW_URL', 'http://localhost/');
|
||||
|
||||
const INIT = __DIR__ . '/../src/include/init.php';
|
||||
|
||||
if (!empty($_SERVER['argv'][1]))
|
||||
{
|
||||
require $_SERVER['argv'][1];
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Lister et exécuter tous les tests unitaires
|
||||
$dir = new RecursiveDirectoryIterator(__DIR__ . '/unit_tests');
|
||||
$iterator = new RecursiveIteratorIterator($dir);
|
||||
|
||||
$files = new RegexIterator($iterator, '/^.*\.php$/i', RecursiveRegexIterator::GET_MATCH);
|
||||
$list = [];
|
||||
|
||||
foreach ($files as $file)
|
||||
{
|
||||
$list[] = $file[0];
|
||||
}
|
||||
|
||||
natcasesort($list);
|
||||
|
||||
foreach ($list as $file)
|
||||
{
|
||||
require $file;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue