Skip to content

Commit

Permalink
Merge "test: Skip failing fixtures istead of silently ignoring them"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Apr 19, 2024
2 parents 54f213a + d091583 commit 7a3b464
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/phpunit/FixturesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,23 @@ public static function provideFixtures() {
if ( in_array( $name, $unsupported ) ) {
continue;
}
$skipTestMessage = false;
if ( self::KNOWN_FAILURE[ $group ][ $name ] ?? false ) {
continue;
$skipTestMessage = 'Known failure, not yet supported.';
}
yield "Fixtures/$group $name" => [ $cssFile, $lessFile, $options ];
yield "Fixtures/$group $name" => [ $cssFile, $lessFile, $options, $skipTestMessage ];
}
}
}

/**
* @dataProvider provideFixtures
*/
public function testFixture( $cssFile, $lessFile, $options ) {
public function testFixture( $cssFile, $lessFile, $options, $ifSetSkipTestMessage = false ) {
if ( $ifSetSkipTestMessage !== false ) {
$this->markTestSkipped( $ifSetSkipTestMessage );
}

$expectedCSS = trim( file_get_contents( $cssFile ) );

// Check with standard parser
Expand Down

0 comments on commit 7a3b464

Please sign in to comment.