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

Is Allowed Guest Checkout #7464

Merged
merged 1 commit into from
Apr 13, 2017
Merged

Is Allowed Guest Checkout #7464

merged 1 commit into from
Apr 13, 2017

Conversation

hungvt
Copy link
Contributor

@hungvt hungvt commented Nov 17, 2016

This code affect to the result of is_allowed. It's alway true even i set it to false from a custom module.

@vrann vrann self-assigned this Mar 21, 2017
@vrann vrann added this to the March 2017 milestone Mar 21, 2017
@vrann
Copy link
Contributor

vrann commented Mar 21, 2017

@hungvt This is a good fix. Due to the mutability of the data passed to the events, initial code wiped out the data generated in other observers and broke the consistency of the flow.

@vrann
Copy link
Contributor

vrann commented Mar 21, 2017

@hungvt There are couple of tests to fix:

There were 3 failures:
1) Magento\Downloadable\Test\Unit\Observer\IsAllowedGuestCheckoutObserverTest::testIsAllowedGuestCheckoutConfigSetToTrue with data set #1 ('downloadable', true)
Expectation failed for method name is equal to <string:setIsAllowed> when invoked at sequence index 0
Parameter 0 for invocation Magento\Framework\DataObject::setIsAllowed(false) does not match expected value.
Failed asserting that false matches expected true.
/home/travis/build/magento/magento2/app/code/Magento/Downloadable/Observer/IsAllowedGuestCheckoutObserver.php:61
/home/travis/build/magento/magento2/app/code/Magento/Downloadable/Test/Unit/Observer/IsAllowedGuestCheckoutObserverTest.php:158
2) Magento\Downloadable\Test\Unit\Observer\IsAllowedGuestCheckoutObserverTest::testIsAllowedGuestCheckoutConfigSetToTrue with data set #2 ('unknown', false)
Expectation failed for method name is equal to <string:setIsAllowed> when invoked at sequence index 0.
The expected invocation at index 0 was never reached.
3) Magento\Downloadable\Test\Unit\Observer\IsAllowedGuestCheckoutObserverTest::testIsAllowedGuestCheckoutConfigSetToFalse
Expectation failed for method name is equal to <string:setIsAllowed> when invoked 1 time(s).
Method was expected to be called 1 times, actually called 0 times.

Can you please do that?

@okorshenko okorshenko modified the milestones: March 2017, April 2017 Apr 2, 2017
@magento-team magento-team merged commit 8bfe7ea into magento:develop Apr 13, 2017
magento-team pushed a commit that referenced this pull request Apr 13, 2017
magento-team pushed a commit that referenced this pull request Apr 13, 2017
@magento-team
Copy link
Contributor

@hungvt Thank you for the contribution

magento-devops-reposync-svc pushed a commit that referenced this pull request Feb 18, 2022
…d-error-reporting-to-highest-level-in-tests

[Pyrrans] AC-2355: setting error_reporting to E_ALL in the test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants