Skip to content

Test directory is inconstant  #268

@mikeymike

Description

@mikeymike

Generally M2 modules conform to a pretty rigid structure (albeit not enforced in any way) and one part of this is the test directory.

All modules have them defined as Test and by calling it tests here you're causing the di compile command to compile the tests too.

Here's the line that makes it skip the Test directory https://github.com/magento/magento2/blob/develop/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php#L228-L230

Note that you want actually see any errors under normal conditions but because we've replaced the ancient version of PHPUnit used by Magento2 with PHPUnit 6 we've also lost the PHPUnit_Framework_TestCase class so the DI compile errors for us.

It's clear anyway that tests shouldn't be compiled so I think we should rename the directory to conform 😄

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions