public static function run_dir($directory = null) { self::$run_all = true; if(!isset($directory)) { $directory = dirname(__FILE__); } $tests = glob($directory . '/test_*.php'); foreach($tests as $test) { include($test); } self::run_all(); }
<?php namespace Habari; include 'bootstrap.php'; // prevent it from running UnitTestCase::$run_all = true; include 'test_multibyte_native.php'; // now let it run UnitTestCase::$run_all = false; $results = MultiByteNativeTest::run_one('MultiByteNativeTest'); echo '<pre>'; $results->code_coverage(); echo '</pre>';