Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extra tests for current interception behavior #965

Merged

Conversation

fooman
Copy link
Contributor

@fooman fooman commented Jan 13, 2015

These tests further document the current behaviour when using multiple extensions intercept the same method. The example method implementation does not follow best practice approach, they do not use the Closure and break the execution chain.


public function beforeW(Intercepted $subject, $param1)
{
return ['<F:bV/>'];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be "bW" instead of bV? Same for the aroundW().

@TexanHogman
Copy link

Looks like this exposes a bug with the processing order. @bluk highlighted that the call to method z in the test should show F was processed last. $this->assertEquals('<F:aZ/>', $subject->Z('test'));. This is the simple case where we reverse order on the way out but that does not appear to be the case. @antonkril can you look and confirm this?

I say simple since Z only has two after plugins so the lowest sort order should be called last on the way out.

@otoolec
Copy link
Contributor

otoolec commented Jan 20, 2015

Thanks for these excellent test cases @fooman! I've opened up MAGETWO-32851 internally to resolve the inconsistency between the behavior and documentation.

@muasir muasir added bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Jan 26, 2015
@magento-team magento-team merged commit 6e9947f into magento:develop Jan 30, 2015
otoolec added a commit that referenced this pull request Jan 30, 2015
…965

- Fixed license headers
- Moved fields from GeneralTest to AbstractPlugin
otoolec added a commit that referenced this pull request Jan 30, 2015
otoolec added a commit that referenced this pull request Jan 30, 2015
vpelipenko added a commit that referenced this pull request Jan 30, 2015
[Github] extra tests for current interception behavior #965
magento-team added a commit to abeeskau/magento2-community-edition that referenced this pull request Feb 7, 2015
* Various improvements:
    * Implemented caching for WebAPI configuration
    * Improved tests coverage of the CurrencySymbol module
    * Table catalogsearch_fulltext is setting up with ENGINE=InnoDB
    * Improved unit test coverage of the Catalog related functionality
    * Optimized JS dependencies
    * Refactored controller actions in the Sales module
    * Refactored controller actions in the Customer module
    * Removed the assertion for the exact number of attributes in API-functional tests for customer metadata.
    * Refactored API code for the CheckoutAgreements module
    * Refactored API code for the GiftMessage module
    * Refactored API for the Checkout module
* Fixed bugs:
    * Fixed an where issue were WebAPI generated the wrong WSDL
    * Fixed an issue where Catalog, Checkout, Customer API ACLs did not support AJAX use case(s)
    * Fixed an issue where SOAP tests failed after upgrading to ZF 1.12.9
    * Fixed an issue where the 'There is no data for export' message was displayed permanently after invalid search
    * Fixed an issue where there was no ability to set category position during creation it
    * Fixed a CSS issue where certain images were absent on banners ()
    * Fixed an issue where the 'Date Of Birth' value was i reset to current date on the customer form)
    * Fixed an issue where the behavior of the "Terms and Conditions" validation on multiple address checkout was different from the one for the onepage checkout
    * Fixed an issue where it was impossible to checkout with multiple addresses
    * Fixed an issue where the 'This is a required field ' message was not displayed for "Terms and Conditions" if the latter  was not selected
* GitHub Requests:
    * [#963](magento/magento2#963) -- Default Accept header
    * [#995](magento/magento2#995) -- Prevent a warning in activated developer mode when 'plugins' is no array
    * [#866](magento/magento2#866) -- Configurable product attribute scope
    * [#965](magento/magento2#965) -- extra tests for current interception behavior
* Service Contracts:
    * The Downloadable module basic implementation
* Framework improvements:
    * Refactored and covered with tests the classes with high CRAP value (>50)
    * Moved Theme Management changes, Design changes, Design\Backend modules, and Observer components from the Core module to the Theme module
    * Moved Debug Hints models from the Core module to the newly added Developer module
    * Moved URL components, Factory, and EntityFactory from the Core module to the Magento Framework
* UI improvements:
    * Compressed and resized images
    * Added new base styles for the Admin re-design
    * Added the WAI-ARIA attributes are to the Search Autocomplete on the storefront
    * Added visual style for the 'skip to content' attribute on the storefront
    * Fixed the style of persistent login messages on the storefront for all themes
    * Fixed the style of scrolling for Categories with long names in the Admin
    * Fixed the "css/print.css" file path on the storefront pages for all themes
* Tests improvements:
    * Converted all fixtures/repositories for functional tests to .xml files
    * Improved interaction between webdriver and the new Magento JS forms
    * Increased unit and integration tests coverage
magento-team added a commit to abeeskau/magento2-community-edition that referenced this pull request Feb 9, 2015
* Various improvements:
    * Implemented caching for WebAPI configuration
    * Improved tests coverage of the CurrencySymbol module
    * Table catalogsearch_fulltext is setting up with ENGINE=InnoDB
    * Improved unit test coverage of the Catalog related functionality
    * Optimized JS dependencies
    * Refactored controller actions in the Sales module
    * Refactored controller actions in the Customer module
    * Removed the assertion for the exact number of attributes in API-functional tests for customer metadata.
    * Refactored API code for the CheckoutAgreements module
    * Refactored API code for the GiftMessage module
    * Refactored API for the Checkout module
* Fixed bugs:
    * Fixed an where issue were WebAPI generated the wrong WSDL
    * Fixed an issue where Catalog, Checkout, Customer API ACLs did not support AJAX use case(s)
    * Fixed an issue where SOAP tests failed after upgrading to ZF 1.12.9
    * Fixed an issue where the 'There is no data for export' message was displayed permanently after invalid search
    * Fixed an issue where there was no ability to set category position during creation it
    * Fixed a CSS issue where certain images were absent on banners ()
    * Fixed an issue where the 'Date Of Birth' value was i reset to current date on the customer form)
    * Fixed an issue where the behavior of the "Terms and Conditions" validation on multiple address checkout was different from the one for the onepage checkout
    * Fixed an issue where it was impossible to checkout with multiple addresses
    * Fixed an issue where the 'This is a required field ' message was not displayed for "Terms and Conditions" if the latter  was not selected
* GitHub Requests:
    * [#963](magento/magento2#963) -- Default Accept header
    * [#995](magento/magento2#995) -- Prevent a warning in activated developer mode when 'plugins' is no array
    * [#866](magento/magento2#866) -- Configurable product attribute scope
    * [#965](magento/magento2#965) -- extra tests for current interception behavior
* Service Contracts:
    * The Downloadable module basic implementation
* Framework improvements:
    * Refactored and covered with tests the classes with high CRAP value (>50)
    * Moved Theme Management changes, Design changes, Design\Backend modules, and Observer components from the Core module to the Theme module
    * Moved Debug Hints models from the Core module to the newly added Developer module
    * Moved URL components, Factory, and EntityFactory from the Core module to the Magento Framework
* UI improvements:
    * Compressed and resized images
    * Added new base styles for the Admin re-design
    * Added the WAI-ARIA attributes are to the Search Autocomplete on the storefront
    * Added visual style for the 'skip to content' attribute on the storefront
    * Fixed the style of persistent login messages on the storefront for all themes
    * Fixed the style of scrolling for Categories with long names in the Admin
    * Fixed the "css/print.css" file path on the storefront pages for all themes
* Tests improvements:
    * Converted all fixtures/repositories for functional tests to .xml files
    * Improved interaction between webdriver and the new Magento JS forms
    * Increased unit and integration tests coverage
@fooman fooman deleted the interception-sort-order-effect-unchained branch January 27, 2016 03:31
@fooman fooman restored the interception-sort-order-effect-unchained branch January 27, 2016 04:19
magento-team pushed a commit that referenced this pull request Mar 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants