mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-02-14 17:58:41 +00:00
get overall coverage to 76%
This commit is contained in:
parent
000bc81372
commit
1336578304
|
|
@ -34,8 +34,18 @@ foreach ($modules as $module) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!\is_file(__DIR__ . '/../../Modules/' . $module . '/tests/Models/' . $model)) {
|
if (\stripos($model, '.php') === false) {
|
||||||
echo $module . ': ' . $model . "\n";
|
throw \Exception('invalid substr');
|
||||||
|
}
|
||||||
|
|
||||||
|
$model = \substr($model, 4, -4); // remove Null and .php from string
|
||||||
|
|
||||||
|
if (empty($model)) {
|
||||||
|
throw \Exception('invalid substr');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!\is_file(__DIR__ . '/../../Modules/' . $module . '/tests/Models/Null' . $model . 'Test.php')) {
|
||||||
|
echo $module . ': Null' . $model . "\n";
|
||||||
|
|
||||||
if (!\is_dir(__DIR__ . '/../../Modules/' . $module . '/tests')) {
|
if (!\is_dir(__DIR__ . '/../../Modules/' . $module . '/tests')) {
|
||||||
\mkdir(__DIR__ . '/../../Modules/' . $module . '/tests');
|
\mkdir(__DIR__ . '/../../Modules/' . $module . '/tests');
|
||||||
|
|
@ -45,8 +55,6 @@ foreach ($modules as $module) {
|
||||||
\mkdir(__DIR__ . '/../../Modules/' . $module . '/tests/Models');
|
\mkdir(__DIR__ . '/../../Modules/' . $module . '/tests/Models');
|
||||||
}
|
}
|
||||||
|
|
||||||
$model = \substr($model, 4, -4); // remove Null and .php from string
|
|
||||||
|
|
||||||
$test = '<?php' . "\n"
|
$test = '<?php' . "\n"
|
||||||
. '/**' . "\n"
|
. '/**' . "\n"
|
||||||
. ' * Orange Management' . "\n"
|
. ' * Orange Management' . "\n"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user