Skip to content

Commit

Permalink
Use line numbers for test IDs
Browse files Browse the repository at this point in the history
Line numbers are stable even if we skip tests
  • Loading branch information
sirreal committed Jan 16, 2024
1 parent 91c6f73 commit 48eb7b9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,9 @@ public function data_external_html5lib_tests() {
}

foreach ( self::parse_html5_dat_testfile( $test_dir . $entry ) as $k => $test ) {
// 1-index our test cases for printing
$case = $k + 1;
// strip .dat extension from filename
$test_suite = substr( $entry, 0, strlen( $entry ) - 4 );
yield "{$test_suite}/case{$case} - line {$test[0]}" => array_slice( $test, 1 );
yield "{$test_suite}/line{$test[0]}" => array_slice( $test, 1 );
}
}
closedir( $handle );
Expand Down

0 comments on commit 48eb7b9

Please sign in to comment.