Skip to content

Commit

Permalink
🐛 Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
damienlagae committed Jan 27, 2024
1 parent f18419f commit cc80d27
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/Unit/XliffConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public function testCatalogueToContent()
$catalogue->add(['foobar' => 'bar']);
$content = XliffConverter::catalogueToContent($catalogue, 'messages');

$this->assertMatchesRegularExpression('/foobar/', $content);
// If PHPUnit 9.0 or higher is used, use assertMatchesRegularExpression() instead
if (method_exists($this, 'assertMatchesRegularExpression')) {
$this->assertMatchesRegularExpression('/foobar/', $content);
} else {
$this->assertRegExp('|foobar|', $content);
}
}
}

0 comments on commit cc80d27

Please sign in to comment.