AgreementTest.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Paypal\Controller\Adminhtml\Billing;
  7. use Magento\TestFramework\Helper\Bootstrap;
  8. /**
  9. * Test class for \Magento\Paypal\Controller\Adminhtml\Billing\Agreement
  10. *
  11. * @magentoAppArea adminhtml
  12. */
  13. class AgreementTest extends \Magento\TestFramework\TestCase\AbstractBackendController
  14. {
  15. /**
  16. * @magentoDataFixture Magento/Customer/_files/customer.php
  17. * @magentoDataFixture Magento/Paypal/_files/billing_agreement.php
  18. */
  19. public function testCustomerGrid()
  20. {
  21. $this->dispatch('backend/paypal/billing_agreement/customergrid/id/1');
  22. $this->assertEquals(
  23. 1,
  24. \Magento\TestFramework\Helper\Xpath::getElementsCountForXpath(
  25. '//th[contains(@class,"col-reference_id")]',
  26. $this->getResponse()->getBody()
  27. ),
  28. "Response for billing agreement orders doesn't contain billing agreement customers grid"
  29. );
  30. $this->assertEquals(
  31. 1,
  32. \Magento\TestFramework\Helper\Xpath::getElementsCountForXpath(
  33. '//td[contains(text(), "REF-ID-TEST-678")]',
  34. $this->getResponse()->getBody()
  35. ),
  36. "Response for billing agreement info doesn't contain reference ID"
  37. );
  38. }
  39. }