Refactor PHPUnit_Util_Test::getHookMethods() to perform the class_exists() check