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

[NFC] Fix PHPUnit8 deprecation warnings in the CRM_AllTests suite #20377

Merged
merged 1 commit into from
May 22, 2021

Conversation

seamuslee001
Copy link
Contributor

Overview

This fixes a number of different deprecation warnings found by PHPUnit8

Before

Deprecation warnings emitted

  • Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead.
  • Using assertNotContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringNotContainsString() or assertStringNotContainsStringIgnoringCase() instead.
  • The @ExpectedException, @expectedExceptionCode, @expectedExceptionMessage, and @expectedExceptionMessageRegExp annotations are deprecated. They will be removed in PHPUnit 9. Refactor your test to use expectException(), expectExceptionCode(), expectExceptionMessage(), or expectExceptionMessageMatches() instead.
  • assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray() instead.

After

No warnings

ping @eileenmcnaughton

@civibot
Copy link

civibot bot commented May 21, 2021

(Standard links)

@civibot civibot bot added the master label May 21, 2021
@seamuslee001 seamuslee001 force-pushed the crm_phpunit8_warnings branch 2 times, most recently from 87b2a14 to 73b3529 Compare May 21, 2021 22:38
@eileenmcnaughton
Copy link
Contributor

When you win this one go ahead & merge - I see if won't clash with the fairly sizable cleanup I have in #20374 which is a good thing

@seamuslee001 seamuslee001 force-pushed the crm_phpunit8_warnings branch 4 times, most recently from ef0c99f to 661d161 Compare May 21, 2021 23:12
@seamuslee001 seamuslee001 force-pushed the crm_phpunit8_warnings branch from 661d161 to 275686a Compare May 21, 2021 23:47
@seamuslee001 seamuslee001 merged commit 3fd0916 into civicrm:master May 22, 2021
@seamuslee001 seamuslee001 deleted the crm_phpunit8_warnings branch May 22, 2021 01:58
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.

2 participants