Skip to content
Snippets Groups Projects
Commit 4822b865 authored by clonemeagain's avatar clonemeagain
Browse files

Update run-tests.php

Allow tester to run single test by specifying it on command line: php run-tests.php TestMyThing etc.

Still works for normal tests.
parent 4526e543
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,9 @@
<?php
if (php_sapi_name() != 'cli') exit();
//Allow user to select suite
$selected_test = (isset($argv[1])) ? $argv[1] : false;
require_once "tests/class.test.php";
if (!function_exists('get_osticket_root_path')) {
......@@ -60,6 +63,8 @@ foreach (glob_recursive(dirname(__file__)."/tests/test.*.php") as $t) {
$class = (include $t);
if (!is_string($class))
continue;
if($selected_test && ($class != $selected_test))
continue;
$test = new $class();
echo "Running: " . $test->name . "\n";
$test->run();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment