PaymentTest.php 843 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Authorizenet\Controller\Directpost;
  7. /**
  8. * Class PaymentTest
  9. */
  10. class PaymentTest extends \Magento\TestFramework\TestCase\AbstractController
  11. {
  12. public function testResponseActionValidationFailed()
  13. {
  14. $this->getRequest()->setPostValue('controller_action_name', 'onepage');
  15. $this->dispatch('authorizenet/directpost_payment/response');
  16. // @codingStandardsIgnoreStart
  17. $this->assertContains(
  18. 'authorizenet/directpost_payment/redirect/success/0/error_msg/The%20transaction%20was'
  19. . '%20declined%20because%20the%20response%20hash%20validation%20failed.',
  20. // @codingStandardsIgnoreEnd
  21. $this->getResponse()->getBody()
  22. );
  23. }
  24. }