Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Test Improvements #50642

Merged
merged 3 commits into from
Mar 19, 2024
Merged

[10.x] Test Improvements #50642

merged 3 commits into from
Mar 19, 2024

Conversation

crynobone
Copy link
Member

@crynobone crynobone commented Mar 19, 2024

  • Use PHPUnit attributes to check if intl extension is required to run
    tests
  • Reset locale changes made when running tests

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@crynobone crynobone mentioned this pull request Mar 19, 2024
wip
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@crynobone crynobone marked this pull request as ready for review March 19, 2024 09:44
@@ -2172,6 +2174,8 @@ public function testSortByMany($collection)
sort($expected, SORT_LOCALE_STRING);
$data = $data->sortBy(['item'], SORT_LOCALE_STRING);
$this->assertEquals($data->pluck('item')->toArray(), $expected);

setlocale(LC_ALL, $defaultLocale);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CleanShot 2024-03-19 at 17 34 34

This fixes an error with SupportStrTest.php locally but is not reproducible in GitHub Actions, I believe this is due to GA not enabling intl extension (or something else).

@driesvints driesvints changed the title Test Improvements [10.x] Test Improvements Mar 19, 2024
@taylorotwell taylorotwell merged commit 8fc7bd4 into 10.x Mar 19, 2024
25 checks passed
@taylorotwell taylorotwell deleted the 10/test-improvements branch March 19, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants