Skip to content

[Translation] skip tests if required class does not exist #38004

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

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Aug 31, 2020

Q A
Branch? 3.4
Bug fix? no
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

@xabbuh
Copy link
Member Author

xabbuh commented Aug 31, 2020

Builds on AppVeyor only fail for master for some reason that I do not understand but this logic applies to 3.4 too.

@xabbuh xabbuh changed the base branch from 3.4 to master August 31, 2020 10:42
@xabbuh xabbuh modified the milestones: 3.4, next Aug 31, 2020
@xabbuh
Copy link
Member Author

xabbuh commented Aug 31, 2020

ah, looks like the failure was actually caused by #37371 which was merged into master

@@ -59,6 +59,10 @@ protected function deleteTmpDir()
*/
public function testThatACacheIsUsed($debug)
{
if (!class_exists(\MessageFormatter::class)) {
$this->markTestSkipped(sprintf('Skipping test as the "%s" class does not exist.', \MessageFormatter::class));
Copy link
Member

Choose a reason for hiding this comment

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

The class does not exist when ext-intl is missing. I think the message should reflect that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea, I have updated the message to provide more information.

Copy link
Member Author

Choose a reason for hiding this comment

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

Suggesting the PHP extension or the polyfill package is inline with the exception that is thrown by the IntlFormatter.

@xabbuh
Copy link
Member Author

xabbuh commented Aug 31, 2020

everything's back to green \o/

@fabpot
Copy link
Member

fabpot commented Aug 31, 2020

Thank you @xabbuh.

@fabpot fabpot merged commit c649bfa into symfony:master Aug 31, 2020
@xabbuh xabbuh deleted the translator-tests branch August 31, 2020 12:11
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.2 Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants