magento-coding-standard
magento-coding-standard copied to clipboard
`@magentoAppArea` annotation REQUIRED for Controllers Integration Tests
Rule
Integration Test class should contain
/**
* @magentoAppArea adminhtml
*/
Reason
This is required annotation to specify the area code for Controllers. Integration Tests fail when it's missing.
Implementation
CC: @lenaorobei We've faced issue related to it when fixing PageBuilder tests.
Hi @lbajsarowicz,
From what I see on DevDocs it does not seem to be required https://devdocs.magento.com/guides/v2.3/test/integration/annotations/magento-app-area.html
Could you please provide more context?
When Integration Tests are missing @magentoAppArea it's automatically assumed that it's frontend. So if you refer to adminhtml - this causes failure (router is unable to recognize the route).
Doing so helps avoiding the situations that we already had with PageBuilder IntegrationTests during introducing AbstractInterface.