Skip to content
This repository was archived by the owner on Apr 30, 2023. It is now read-only.
This repository was archived by the owner on Apr 30, 2023. It is now read-only.

[Bug]: PHP Unit test Cases are not updated #87

@pratikvs

Description

@pratikvs

Contact Details

[email protected]

What happened?

I tried to run PHP unit test for the module it gives the compatibility issue with php unit testing. Please note the verion used in the composer for php unit test is below.
"phpunit/phpunit": "^9"
The Error is as follows :
`PHP Fatal error: Declaration of Facebook\BusinessExtension\Test\Unit\Block\Pixel\HeadTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in /var/www/html/m242/vendor/facebook/facebook-for-magento2/Test/Unit/Block/Pixel/HeadTest.php on line 41

Fatal error: Declaration of Facebook\BusinessExtension\Test\Unit\Block\Pixel\HeadTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in /var/www/html/m242/vendor/facebook/facebook-for-magento2/Test/Unit/Block/Pixel/HeadTest.php on line 41`

The issue exists because of not using : void after every setup() in every file in the Test files.

Magento Version

2.4.3 Enterprise Edition

Plugin Version

1.4.3

Relevant log output

`PHP Fatal error: Declaration of Facebook\BusinessExtension\Test\Unit\Block\Pixel\HeadTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in /var/www/html/m242/vendor/facebook/facebook-for-magento2/Test/Unit/Block/Pixel/HeadTest.php on line 41

Fatal error: Declaration of Facebook\BusinessExtension\Test\Unit\Block\Pixel\HeadTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in /var/www/html/m242/vendor/facebook/facebook-for-magento2/Test/Unit/Block/Pixel/HeadTest.php on line 41`

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions