DataTest.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Tax\Helper;
  7. class DataTest extends \PHPUnit\Framework\TestCase
  8. {
  9. /**
  10. * Tax helper
  11. *
  12. * @var \Magento\Tax\Helper\Data
  13. */
  14. private $helper;
  15. /**
  16. * Object Manager
  17. *
  18. * @var \Magento\Framework\ObjectManagerInterface
  19. */
  20. private $objectManager;
  21. public function setUp()
  22. {
  23. $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
  24. /** @var $helper \Magento\Tax\Helper\Data */
  25. $this->helper = $this->objectManager->get(\Magento\Tax\Helper\Data::class);
  26. }
  27. /**
  28. * @magentoConfigFixture default_store tax/classes/default_customer_tax_class 1
  29. */
  30. public function testGetDefaultCustomerTaxClass()
  31. {
  32. $this->assertEquals(1, $this->helper->getDefaultCustomerTaxClass());
  33. }
  34. /**
  35. * @magentoConfigFixture default_store tax/classes/default_product_tax_class 1
  36. */
  37. public function testGetDefaultProductTaxClass()
  38. {
  39. $this->assertEquals(1, $this->helper->getDefaultProductTaxClass());
  40. }
  41. }