connect(); // Make this the default database for the rest of this run Database::$instances = array('default' => $db); } catch (Exception $e) { print "{$e->getMessage()}\n"; return; } } // 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); // We probably don't want to uninstall and reinstall the core every time, but let's start off // this way. core_installer::uninstall(); core_installer::install(); print new Unit_Test(); } }