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

Refactor deprecated setMethod in unit tests #9855

Merged

Conversation

kuzmany
Copy link
Member

@kuzmany kuzmany commented Mar 29, 2021

Q A
Branch? "features" for all features, enhancements and bug fixes (until 3.3.0 is released)
Bug fix? yes/no
New feature? yes/no
Deprecations? yes/no
BC breaks? yes/no
Automated tests included? yes/no
Related user documentation PR URL mautic/mautic-documentation#...
Related developer documentation PR URL mautic/developer-documentation#...
Issue(s) addressed Fixes #...

Description:

setMethod in unit tests marked as @deprecated sebastianbergmann/phpunit#3687
This PR refactor it

Steps to test this PR:

  1. Load up this PR
  2. Wait to pass CI

@cla-bot cla-bot bot added the cla-signed The PR contributors have signed the contributors agreement label Mar 29, 2021
@kuzmany kuzmany changed the title Replace deprecated setMethod in unit tests Refactor deprecated setMethod in unit tests Mar 29, 2021
@kuzmany kuzmany force-pushed the refactor-deprecated-setMethod-phpunit branch from 9645d8a to 0ef00c2 Compare March 29, 2021 09:27
@kuzmany kuzmany added this to the Mautic 4.0 milestone Mar 29, 2021
@RCheesley RCheesley modified the milestones: 4.0-alpha, 4.0-beta Mar 29, 2021
@escopecz
Copy link
Sponsor Member

The tests are failing mostly with message

Trying to set mock method "setFirstResult" with onlyMethods, but it does not exist in class "Doctrine\ORM\AbstractQuery". Use addMethods() for methods that do not exist in the class

@kuzmany can you look into this? Otherwise thanks for taking care of that!

@escopecz escopecz added automated-tests Anything related to unit, functional or e2e tests has-conflicts Pull requests that cannot be merged until conflicts have been resolved pending-feedback PR's and issues that are awaiting feedback from the author labels Apr 20, 2021
@kuzmany kuzmany added ready-to-test PR's that are ready to test and removed has-conflicts Pull requests that cannot be merged until conflicts have been resolved pending-feedback PR's and issues that are awaiting feedback from the author labels May 2, 2021
@kuzmany
Copy link
Member Author

kuzmany commented May 2, 2021

@escopecz I had little time to finish it. Now unit tests passed

@kuzmany kuzmany requested review from escopecz and hluchas May 14, 2021 07:00
@kuzmany
Copy link
Member Author

kuzmany commented May 14, 2021

@fedys Can you look on this PR?

@npracht npracht added the chore Tasks that relate to maintaining this Github repository label May 14, 2021
@npracht npracht modified the milestones: 4.0-beta, 4.0-rc May 14, 2021
@fedys
Copy link
Member

fedys commented May 14, 2021

@kuzmany I'm on it

@fedys fedys self-requested a review May 14, 2021 12:05
Copy link
Member

@fedys fedys left a comment

Choose a reason for hiding this comment

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

Thera are no issues. Thanks @kuzmany !

Copy link
Sponsor Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

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

👍

@escopecz escopecz added ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged and removed ready-to-test PR's that are ready to test labels May 14, 2021
@npracht npracht merged commit 969d26e into mautic:features May 14, 2021
@RCheesley RCheesley modified the milestones: 4.0-rc, 4.0-beta May 25, 2021
@RCheesley RCheesley added the enhancement Any improvement to an existing feature or functionality label May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated-tests Anything related to unit, functional or e2e tests chore Tasks that relate to maintaining this Github repository cla-signed The PR contributors have signed the contributors agreement enhancement Any improvement to an existing feature or functionality ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants