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

PhpUnit 8 Migration - Amqp #27522

Merged
merged 3 commits into from
Apr 14, 2020

Conversation

ihor-sviziev
Copy link
Contributor

Description (*)

This PR updates unit tests in Amqp module + contains framework fix from #27519

Note:
We have 3 warnings that can't be fixed because these new methods doesn't exists in phpunit 6:

1) Magento\Amqp\Test\Unit\Setup\ConfigOptionsListTest::testCreateConfig with data set #0 (array('host', 'port', 'user', 'password', 'virtual host', 'ssl', '{"ssl_option":"test"}'), array(array(array('host', 'port', 'user', 'password', 'virtual host', 'ssl', array('test')))))
assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead.

2) Magento\Amqp\Test\Unit\Setup\ConfigOptionsListTest::testCreateConfig with data set #1 (array('host', '5672', 'user', 'password', 'virtual host', 'ssl', '{"ssl_option":"test"}'), array(array(array('host', '5672', 'user', 'password', 'virtual host', 'ssl', array('test')))))
assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead.

3) Magento\Amqp\Test\Unit\Setup\ConfigOptionsListTest::testCreateConfig with data set #2 (array('', '5672', '', '', '/', ''), array())
assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead.

Related Pull Requests

Fixed Issues (if relevant)

  1. Unit Tests incompatible with PHPUnit 8 #27500

Manual testing scenarios (*)

  1. Run tests in phpunit 6 (currently in 2.4-develop) using vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist app/code/Magento/Amqp/
  2. Install phpunit 8, run tests using vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist app/code/Magento/Amqp/

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Update unit tests in Amqp module
@m2-assistant
Copy link

m2-assistant bot commented Mar 31, 2020

Hi @ihor-sviziev. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@ihor-sviziev
Copy link
Contributor Author

@magento run all tests

@ihor-sviziev
Copy link
Contributor Author

@lbajsarowicz all tests are passed, please do review

Copy link
Contributor

@lbajsarowicz lbajsarowicz left a comment

Choose a reason for hiding this comment

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

Great, thank you!

@magento-engcom-team
Copy link
Contributor

Hi @lbajsarowicz, thank you for the review.
ENGCOM-7291 has been created to process this Pull Request
✳️ @lbajsarowicz, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@engcom-Alfa engcom-Alfa self-assigned this Apr 13, 2020
@engcom-Alfa engcom-Alfa added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Apr 13, 2020
@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Before:
Screenshot from 2020-04-13 10-33-32

After:
Screenshot from 2020-04-13 10-37-57

@VladimirZaets VladimirZaets added this to the 2.4.0 milestone Apr 13, 2020
@magento-engcom-team magento-engcom-team merged commit 4952280 into magento:2.4-develop Apr 14, 2020
@m2-assistant
Copy link

m2-assistant bot commented Apr 14, 2020

Hi @ihor-sviziev, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

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.

6 participants