Skip to content

[Forwardport] Update regex in ControllerAclTest#17145

Closed
mage2pratik wants to merge 1 commit into
magento:2.3-developfrom
mage2pratik:forwardport-patch-16707
Closed

[Forwardport] Update regex in ControllerAclTest#17145
mage2pratik wants to merge 1 commit into
magento:2.3-developfrom
mage2pratik:forwardport-patch-16707

Conversation

@mage2pratik
Copy link
Copy Markdown
Contributor

Original Pull Request

#16707

Description

Change regex in ControllerAclTest::getControllerPath() to avoid classes which are under a namespace with a "Controller" part (like for example controller plugins) being interpreted as controllers causing the Act test to fail.

I need this change because, in the scope of MSI development, I have to define the following plugin for a controller:

    <type name="Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter">
        <plugin name="allow_negative_min_qty"
                type="Magento\InventoryCatalog\Plugin\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter\AllowNegativeMinQtyPlugin"
                sortOrder="1"/>

The Magento\InventoryCatalog\Plugin\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter\AllowNegativeMinQtyPlugin plugin class makes the test fail because it is considered a controller but doesn't extend \Magento\Backend\App\AbstractAction.

Manual testing scenarios

  • define a plugin on a controller declaring it under a namespace with a "Controller" part
  • run the ControllerAclTest static test
  • expect the test to fail

@magento-engcom-team
Copy link
Copy Markdown
Contributor

Hi @mage2pratik. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me {$VERSION} instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Copy Markdown
Contributor

Hi @mage2pratik
Thank you for your contribution. This pull request has been combined (merged) with #17133 to optimize pull requests queue on magento/magento2 repository
Closing this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants