Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
alphp committed Jan 26, 2024
1 parent 63e87e2 commit 335e777
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/LocaleTests/Locale_eu_TestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function testLocale_eu () {
$this->assertEquals('mar.', $result, '%b: Abbreviated month name, based on the locale');

$result = strftime('%B', '20220306 13:02:03', $locale);
$this->assertEquals('martxoak', $result, '%B: Full month name, based on the locale');
$this->assertMatchesRegularExpression('|martxoak?|', $result, '%B: Full month name, based on the locale');

$result = strftime('%h', '20220306 13:02:03', $locale);
$this->assertEquals('mar.', $result, '%h: Abbreviated month name, based on the locale (an alias of %b)');
Expand All @@ -29,7 +29,7 @@ public function testLocale_eu () {
$this->assertEquals('13:02:03', $result, '%X: Preferred time representation based on locale, without the date');

$result = strftime('%c', '20220306 13:02:03', $locale);
$this->assertEquals('2022(e)ko martxoakren 6(a) 13:02', $result, '%c: Preferred date and time stamp based on locale');
$this->assertMatchesRegularExpression('|2022\(e\)ko martxoak?ren 6\(a\) \(?13:02\)?|', $result, '%c: Preferred date and time stamp based on locale');

$result = strftime('%x', '20220306 13:02:03', $locale);
$this->assertEquals('22/3/6', $result, '%x: Preferred date representation based on locale, without the time');
Expand Down
2 changes: 1 addition & 1 deletion tests/LocaleTests/Locale_it_CH_TestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testLocale_it_CH () {
$this->assertEquals('13:02:03', $result, '%X: Preferred time representation based on locale, without the date');

$result = strftime('%c', '20220306 13:02:03', $locale);
$this->assertEquals('6 marzo 2022 13:02', $result, '%c: Preferred date and time stamp based on locale');
$this->assertMatchesRegularExpression('|6 marzo 2022 (alle ore )?13:02|', $result, '%c: Preferred date and time stamp based on locale');

$result = strftime('%x', '20220306 13:02:03', $locale);
$this->assertEquals('06.03.22', $result, '%x: Preferred date representation based on locale, without the time');
Expand Down
2 changes: 1 addition & 1 deletion tests/LocaleTests/Locale_it_IT_TestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testLocale_it_IT () {
$this->assertEquals('13:02:03', $result, '%X: Preferred time representation based on locale, without the date');

$result = strftime('%c', '20220306 13:02:03', $locale);
$this->assertEquals('6 marzo 2022 13:02', $result, '%c: Preferred date and time stamp based on locale');
$this->assertMatchesRegularExpression('|6 marzo 2022 (alle ore )?13:02|', $result, '%c: Preferred date and time stamp based on locale');

$result = strftime('%x', '20220306 13:02:03', $locale);
$this->assertEquals('06/03/22', $result, '%x: Preferred date representation based on locale, without the time');
Expand Down

0 comments on commit 335e777

Please sign in to comment.