summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-07-11 12:45:49 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-07-11 12:46:56 +0200
commitc02dfddda3c4e267c99d301f5f042f36da50a658 (patch)
treea5301a11b5e3d1de64647e5a1f2623442b0f69c6 /run-tests.php
parentd20fc5a1927c98db7d4e96c17b9988569822592a (diff)
downloadphp-git-c02dfddda3c4e267c99d301f5f042f36da50a658.tar.gz
Include test name in JUnit testcase name
Azure does not show the classname attribute in any convenient way, and the file name is the part we usually care about.
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/run-tests.php b/run-tests.php
index 96df073a84..d83669b706 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -3444,8 +3444,8 @@ function junit_mark_test_as($type, $file_name, $test_name, $time = null, $messag
}, $escaped_details);
$escaped_message = htmlspecialchars($message, ENT_QUOTES, 'UTF-8');
- $escaped_test_name = htmlspecialchars($test_name, ENT_QUOTES);
- $JUNIT['files'][$file_name]['xml'] = "<testcase classname='$file_name' name='$escaped_test_name' time='$time'>\n";
+ $escaped_test_name = htmlspecialchars($file_name . ' (' . $test_name . ')', ENT_QUOTES);
+ $JUNIT['files'][$file_name]['xml'] = "<testcase name='$escaped_test_name' time='$time'>\n";
if (is_array($type)) {
$output_type = $type[0] . 'ED';