Lines Matching refs:file_name
2814 * @param string $file_name
2821 function junit_mark_test_as($type, $file_name, $test_name, $time = null, $message = '', $details = … argument
2825 $suite = junit_get_suitename_for($file_name);
2829 $time = $time ?? junit_get_timer($file_name);
2839 …$JUNIT['files'][$file_name]['xml'] = "<testcase classname='" . $suite . "." . basename($file_name)…
2853 $JUNIT['files'][$file_name]['xml'] .= "<error type='$output_type' message='$escaped_message'/>\n";
2856 $JUNIT['files'][$file_name]['xml'] .= "<skipped>$escaped_message</skipped>\n";
2859 $JUNIT['files'][$file_name]['xml'] .= "<warning>$escaped_message</warning>\n";
2862 …$JUNIT['files'][$file_name]['xml'] .= "<failure type='$output_type' message='$escaped_message'>$es…
2865 …$JUNIT['files'][$file_name]['xml'] .= "<error type='$output_type' message='$escaped_message'>$esca…
2868 $JUNIT['files'][$file_name]['xml'] .= "</testcase>\n";
2879 function junit_get_timer($file_name) { argument
2883 if (isset($JUNIT['files'][$file_name]['total'])) {
2884 return number_format($JUNIT['files'][$file_name]['total'], 4);
2890 function junit_start_timer($file_name) { argument
2894 if (!isset($JUNIT['files'][$file_name]['start'])) {
2895 $JUNIT['files'][$file_name]['start'] = microtime(true);
2897 $suite = junit_get_suitename_for($file_name);
2899 $JUNIT['suites'][$suite]['files'][$file_name] = $file_name;
2903 function junit_get_suitename_for($file_name) { argument
2904 return junit_path_to_classname(dirname($file_name));
2907 function junit_path_to_classname($file_name) { argument
2915 if (is_file($file_name)) {
2916 $dir = dirname(realpath($file_name));
2918 $dir = realpath($file_name);
2935 return $JUNIT['name'] . '.' . str_replace(array(DIRECTORY_SEPARATOR, '-'), '.', $file_name);
2959 function junit_finish_timer($file_name) { argument
2963 if (!isset($JUNIT['files'][$file_name]['start'])) {
2964 error("Timer for $file_name was not started!");
2967 if (!isset($JUNIT['files'][$file_name]['total'])) {
2968 $JUNIT['files'][$file_name]['total'] = 0;
2971 $start = $JUNIT['files'][$file_name]['start'];
2972 $JUNIT['files'][$file_name]['total'] += microtime(true) - $start;
2973 unset($JUNIT['files'][$file_name]['start']);