Lines Matching refs:file_name
2657 * @param string $file_name
2664 function junit_mark_test_as($type, $file_name, $test_name, $time = null, $message = '', $details = … argument
2668 $suite = junit_get_suitename_for($file_name);
2672 $time = null !== $time ? $time : junit_get_timer($file_name);
2677 $escaped_test_name = basename($file_name) . ' - ' . htmlspecialchars($test_name, ENT_QUOTES);
2678 …$JUNIT['files'][$file_name]['xml'] = "<testcase classname='$suite' name='$escaped_test_name' time=…
2692 $JUNIT['files'][$file_name]['xml'] .= "<error type='$output_type' message='$message'/>\n";
2695 $JUNIT['files'][$file_name]['xml'] .= "<skipped>$message</skipped>\n";
2698 …$JUNIT['files'][$file_name]['xml'] .= "<failure type='$output_type' message='$message'>$escaped_de…
2701 …$JUNIT['files'][$file_name]['xml'] .= "<error type='$output_type' message='$message'>$escaped_deta…
2704 $JUNIT['files'][$file_name]['xml'] .= "</testcase>\n";
2715 function junit_get_timer($file_name) { argument
2719 if (isset($JUNIT['files'][$file_name]['total'])) {
2720 return number_format($JUNIT['files'][$file_name]['total'], 4);
2726 function junit_start_timer($file_name) { argument
2730 if (!isset($JUNIT['files'][$file_name]['start'])) {
2731 $JUNIT['files'][$file_name]['start'] = microtime(true);
2733 $suite = junit_get_suitename_for($file_name);
2735 $JUNIT['suites'][$suite]['files'][$file_name] = $file_name;
2739 function junit_get_suitename_for($file_name) { argument
2740 return junit_path_to_classname(dirname($file_name));
2743 function junit_path_to_classname($file_name) { argument
2745 return $JUNIT['name'] . '.' . str_replace(DIRECTORY_SEPARATOR, '.', $file_name);
2769 function junit_finish_timer($file_name) { argument
2773 if (!isset($JUNIT['files'][$file_name]['start'])) {
2774 error("Timer for $file_name was not started!");
2777 if (!isset($JUNIT['files'][$file_name]['total'])) {
2778 $JUNIT['files'][$file_name]['total'] = 0;
2781 $start = $JUNIT['files'][$file_name]['start'];
2782 $JUNIT['files'][$file_name]['total'] += microtime(true) - $start;
2783 unset($JUNIT['files'][$file_name]['start']);