Lines Matching refs:file_name
2694 * @param string $file_name
2701 function junit_mark_test_as($type, $file_name, $test_name, $time = null, $message = '', $details = … argument
2705 $suite = junit_get_suitename_for($file_name);
2709 $time = null !== $time ? $time : junit_get_timer($file_name);
2718 $escaped_test_name = basename($file_name) . ' - ' . htmlspecialchars($test_name, ENT_QUOTES);
2719 …$JUNIT['files'][$file_name]['xml'] = "<testcase classname='$suite' name='$escaped_test_name' time=…
2733 $JUNIT['files'][$file_name]['xml'] .= "<error type='$output_type' message='$escaped_message'/>\n";
2736 $JUNIT['files'][$file_name]['xml'] .= "<skipped>$escaped_message</skipped>\n";
2739 $JUNIT['files'][$file_name]['xml'] .= "<warning>$escaped_message</warning>\n";
2742 …$JUNIT['files'][$file_name]['xml'] .= "<failure type='$output_type' message='$escaped_message'>$es…
2745 …$JUNIT['files'][$file_name]['xml'] .= "<error type='$output_type' message='$escaped_message'>$esca…
2748 $JUNIT['files'][$file_name]['xml'] .= "</testcase>\n";
2759 function junit_get_timer($file_name) { argument
2763 if (isset($JUNIT['files'][$file_name]['total'])) {
2764 return number_format($JUNIT['files'][$file_name]['total'], 4);
2770 function junit_start_timer($file_name) { argument
2774 if (!isset($JUNIT['files'][$file_name]['start'])) {
2775 $JUNIT['files'][$file_name]['start'] = microtime(true);
2777 $suite = junit_get_suitename_for($file_name);
2779 $JUNIT['suites'][$suite]['files'][$file_name] = $file_name;
2783 function junit_get_suitename_for($file_name) { argument
2784 return junit_path_to_classname(dirname($file_name));
2787 function junit_path_to_classname($file_name) { argument
2789 return $JUNIT['name'] . '.' . str_replace(DIRECTORY_SEPARATOR, '.', $file_name);
2813 function junit_finish_timer($file_name) { argument
2817 if (!isset($JUNIT['files'][$file_name]['start'])) {
2818 error("Timer for $file_name was not started!");
2821 if (!isset($JUNIT['files'][$file_name]['total'])) {
2822 $JUNIT['files'][$file_name]['total'] = 0;
2825 $start = $JUNIT['files'][$file_name]['start'];
2826 $JUNIT['files'][$file_name]['total'] += microtime(true) - $start;
2827 unset($JUNIT['files'][$file_name]['start']);