public function startTest(PHPUnit_Framework_Test $test)
{
if ($test instanceof CodeBaseAwareTestInterface) {
// We're holding a static reference to the
// CodeBase because its pretty slow to build. To
// avoid state moving from test to test, we clone
// the CodeBase for each test to avoid changing
// the one we're building here.
static $code_base = null;
if (!$code_base) {
global $internal_class_name_list;
global $internal_interface_name_list;
global $internal_trait_name_list;
global $internal_function_name_list;
$code_base = new CodeBase($internal_class_name_list, $internal_interface_name_list, $internal_trait_name_list, $internal_function_name_list);
}
$test->setCodeBase(clone $code_base);
}
}