iflrandevu/doc/thesis/snippets/unit_test_automation.php
alextselegidis@gmail.com 5385243cb5 * Added content to implementation.tex
* Made corrections into several tex files.
2013-10-25 20:10:19 +00:00

15 lines
No EOL
482 B
PHP

<?php
/**
* Run all the available tests
*/
public function run_all() {
// All the methods whose names start with "test" are going to be
// executed. If you want a method to not be executed remove the
// "test" keyword from the beginning.
$class_methods = get_class_methods('Unit_tests_admins_model');
foreach ($class_methods as $method_name) {
if (substr($method_name, 0, 5) === 'test_') {
call_user_func(array($this, $method_name));
}
}
}