ConfigTest.php 999 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Contact\Model;
  7. use Magento\TestFramework\Helper\Bootstrap;
  8. class ConfigTest extends \PHPUnit\Framework\TestCase
  9. {
  10. /**
  11. * @var ConfigInterface
  12. */
  13. private $configModel;
  14. protected function setUp()
  15. {
  16. $this->configModel = Bootstrap::getObjectManager()->create(\Magento\Contact\Model\ConfigInterface::class);
  17. }
  18. /**
  19. * @magentoAppArea frontend
  20. * @magentoAppIsolation enabled
  21. * @magentoConfigFixture current_store contact/contact/enabled 1
  22. */
  23. public function testIsEnabled()
  24. {
  25. $this->assertTrue($this->configModel->isEnabled());
  26. }
  27. /**
  28. * @magentoAppArea frontend
  29. * @magentoAppIsolation enabled
  30. * @magentoConfigFixture current_store contact/contact/enabled 0
  31. */
  32. public function testIsNotEnabled()
  33. {
  34. $this->assertFalse($this->configModel->isEnabled());
  35. }
  36. }