Skip to content

Static unit tests failure #10146

@ionutturdean

Description

@ionutturdean

Hi,

After installing Magento-EE-2.1.7, and adding one test module the static unit tests are failing.
If I run the tests just on the Magento-EE-2.1.7 with no custom module the test are working with no errors.

Preconditions

I am using Magento-EE-2.1.7

Steps to reproduce

Create a custom module
Run the unit tests:
php bin/magento dev:tests:run unit

Expected result

  1. Tests should run with no errors

Actual result

PHPUnit 4.1.0 by Sebastian Bergmann.

Configuration read from /var/www/html/magento2/dev/tests/static/framework/tests/unit/phpunit.xml.dist

...............................F...F......FFF.................... 65 / 66 ( 98%)
.

Time: 270 ms, Memory: 8.00MB

There were 5 failures:

  1. Magento\TestFramework\Dependency\PhpRuleTest::testGetDependencyInfo with data set "Extend class in different module" ('Magento\AnotherModule\SomeClass', 'something extends \Magento\SomeModule\Any\ClassName {', array(array('Magento\SomeModule', 'hard', 'Magento\SomeModule\Any\ClassName')))
    Failed asserting that two arrays are equal.
    --- Expected
    +++ Actual
    @@ @@
    Array (
  • 0 => Array (...)
    )

/var/www/html/magento2/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/PhpRuleTest.php:42

  1. Magento\TestFramework\Dependency\PhpRuleTest::testGetDependencyInfo with data set "Helper class from another module" ('Magento\AnotherModule\SomeClass', '$this->helper("Magento\SomeModule\Any\ClassName")', array(array('Magento\SomeModule', 'hard', 'Magento\SomeModule\Any\ClassName')))
    Failed asserting that two arrays are equal.
    --- Expected
    +++ Actual
    @@ @@
    Array (
  • 0 => Array (...)
    )

/var/www/html/magento2/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/PhpRuleTest.php:42

  1. Magento\TestFramework\Dependency\PhpRuleTest::testGetDependencyInfo with data set "Plugin on class in different module" ('Magento\Module1\Plugin2', 'Magento\Module2\Subject', array(array('Magento\Module2', 'soft', 'Magento\Module2\Subject')))
    Failed asserting that two arrays are equal.
    --- Expected
    +++ Actual
    @@ @@
    Array (
  • 0 => Array (...)
    )

/var/www/html/magento2/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/PhpRuleTest.php:42

  1. Magento\TestFramework\Dependency\PhpRuleTest::testGetDependencyInfo with data set "Plugin depends on arbitrary class in same module as subject" ('Magento\Module1\Plugin2', 'Magento\Module2\NotSubject', array(array('Magento\Module2', 'soft', 'Magento\Module2\NotSubject')))
    Failed asserting that two arrays are equal.
    --- Expected
    +++ Actual
    @@ @@
    Array (
  • 0 => Array (...)
    )

/var/www/html/magento2/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/PhpRuleTest.php:42

  1. Magento\TestFramework\Dependency\PhpRuleTest::testGetDependencyInfo with data set "Plugin depends on arbitrary class in arbitrary module" ('Magento\Module1\Plugin2', 'Magento\OtherModule\NotSubject', array(array('Magento\OtherModule', 'hard', 'Magento\OtherModule\NotSubject')))
    Failed asserting that two arrays are equal.
    --- Expected
    +++ Actual
    @@ @@
    Array (
  • 0 => Array (...)
    )

/var/www/html/magento2/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/PhpRuleTest.php:42

FAILURES!
Tests: 66, Assertions: 89, Failures: 5.

Similar issue was reported in this ticket: #3901
The ticket was closed on the 27 of March as the test was no longer failing, but for me is still reproducing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: Bundled ExtensionIssue is caused by one of the bundled extensionsFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedReproduced on 2.2.xThe issue has been reproduced on latest 2.2 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions