Skip to content

#27500 PHPUnit 8 for module Cookie #27708

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

Closed

Conversation

lbajsarowicz
Copy link
Contributor

Description (*)

Preparing PHPUnit Tests to run with PHPUnit 8.
PRs for each module is separated to make tests easier to merge.

Related Pull Requests

Fixed Issues (if relevant)

  1. Unit Tests incompatible with PHPUnit 8 #27500

Manual testing scenarios (*)

N/A

Questions or comments

PR #27701 needs to be merged first (otherwise PHPUnit tests fail)

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)

@m2-assistant
Copy link

m2-assistant bot commented Apr 11, 2020

Hi @lbajsarowicz. 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.

@lbajsarowicz lbajsarowicz force-pushed the phpunit8/module-Cookie branch from c280907 to 1321d7b Compare April 11, 2020 03:54
@eduard13 eduard13 self-assigned this Apr 11, 2020
Copy link
Contributor

@eduard13 eduard13 left a comment

Choose a reason for hiding this comment

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

Hi @lbajsarowicz thank you for these improvements. Could you please check these minor adjustments?
Let's also see the checks result.
Thank you.

@@ -8,34 +8,36 @@

namespace Magento\Cookie\Test\Unit\Block;

use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\MockObject\MockObject;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please sort these imports ascending?

@@ -5,60 +5,68 @@
*/
namespace Magento\Cookie\Test\Unit\Controller\Index;

use PHPUnit\Framework\TestCase;
Copy link
Contributor

Choose a reason for hiding this comment

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

The same here

@@ -5,39 +5,49 @@
*/
namespace Magento\Cookie\Test\Unit\Helper;

class CookieTest extends \PHPUnit\Framework\TestCase
use PHPUnit\Framework\TestCase;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@@ -5,29 +5,36 @@
*/
namespace Magento\Cookie\Test\Unit\Model\Config\Backend;

use PHPUnit\Framework\TestCase;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@@ -8,33 +8,37 @@

namespace Magento\Cookie\Test\Unit\Model\Config\Backend;

use PHPUnit\Framework\TestCase;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@@ -5,60 +5,68 @@
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please also declare the declare(strict_types=1);?

Suggested change
*/
*/
declare(strict_types=1);

@@ -5,39 +5,49 @@
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
*/
*/
declare(strict_types=1);

@@ -5,29 +5,36 @@
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
*/
*/
declare(strict_types=1);

@@ -8,33 +8,37 @@

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
declare(strict_types=1);

@@ -8,34 +8,38 @@

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
declare(strict_types=1);

@srsathish92
Copy link
Contributor

@eduard13 @lbajsarowicz Already PR #27658 raised for Module_Cookie with PHPUnit 8 compatibility. So I think this PR needs to be closed.

@eduard13
Copy link
Contributor

Thank you @srsathish92.
@lbajsarowicz closing as a duplicate.
Thank you.

@eduard13 eduard13 closed this Apr 11, 2020
@m2-assistant
Copy link

m2-assistant bot commented Apr 11, 2020

Hi @lbajsarowicz, 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.

4 participants