mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-04-29 09:49:06 -04:00
Exclude demo tests
This commit is contained in:
@@ -22,6 +22,17 @@ class Test_Controller extends Controller {
|
||||
if (!defined('TEST_MODE')) {
|
||||
print Kohana::show_404();
|
||||
}
|
||||
|
||||
// Find all tests, excluding sample tests that come with the unit_test module.
|
||||
$paths = array(APPPATH . "tests");
|
||||
foreach (glob(MODPATH . "*/tests") as $path) {
|
||||
if ($path != MODPATH . "unit_test/tests") {
|
||||
$paths[] = $path;
|
||||
}
|
||||
|
||||
}
|
||||
Kohana::config_set('unit_test.paths', $paths);
|
||||
|
||||
$test = new Unit_Test(DOCROOT . "modules/gallery_unit_test/tests");
|
||||
echo $test;
|
||||
}
|
||||
|
||||
@@ -51,8 +51,10 @@ foreach ($results as $class => $methods) {
|
||||
}
|
||||
|
||||
printf(">> TOTAL\t%s: %.2f%%\t%s: %d\t%s: %d\t%s: %d\t%s: %d\n",
|
||||
Kohana::lang("unit_test.score"), 100 * ($totals["passed"] / $totals["total"]),
|
||||
Kohana::lang("unit_test.score"),
|
||||
($totals["total"] ? 100 * ($totals["passed"] / $totals["total"]) : 0),
|
||||
Kohana::lang("unit_test.total"), $totals["total"],
|
||||
Kohana::lang("unit_test.passed"), $totals["passed"],
|
||||
Kohana::lang("unit_test.failed"), $totals["failed"],
|
||||
Kohana::lang("unit_test.errors"), $totals["errors"]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user