Skip to content

ConfigurationTest fails when installing via composer #12574

@barbazul

Description

@barbazul

An integration test is failing when Magento is built via composer (not when clones from github).

The problem seems to be that basePath is calculated as the app directory but the actual code is in vendor so XML configuration is not found and an uncatched exception is thrown at

$content = $this->appDir->readFile($this->appDir->getRelativePath($file->getFullPath()));

Preconditions

  1. Build magento via command line as instructed in the devdocs
  2. Set up integration tests as instructed in the devdocs

Steps to reproduce

  1. php vendor/bin/phpunit -c dev/tests/integration --filter ConfigurationTest

Expected result

  1. Test passes

Actual result

PHPUnit 6.2.4 by Sebastian Bergmann and contributors.

E                                                                   1 / 1 (100%)

Time: 5.17 seconds, Memory: 218.59MB

There was 1 error:

1) Magento\Ui\Component\ConfigurationTest::testConfiguration
Magento\Framework\Exception\FileSystemException: Cannot read contents from file "/var/www/html/app/var/www/html/vendor/magento/module-email/view/adminhtml/ui_component/design_config_form.xml"

/var/www/html/vendor/magento/framework/Filesystem/Driver/File.php:149
/var/www/html/vendor/magento/framework/Filesystem/Directory/Read.php:214
/var/www/html/dev/tests/integration/testsuite/Magento/Ui/Component/ConfigurationTest.php:87
/var/www/html/vendor/phpunit/phpunit/phpunit:53

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.

=== Memory Usage System Stats ===
Memory usage (OS):      245.58M (113.69% of 216.00M reported by PHP)
Estimated memory leak:  29.58M (12.04% of used memory)

Metadata

Metadata

Assignees

Labels

Fixed in 2.2.xThe issue has been fixed in 2.2 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced 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