ConfigTest.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Theme\Model\Design;
  7. /**
  8. * Test for \Magento\Theme\Model\Design\Config\Storage.
  9. */
  10. class ConfigTest extends \PHPUnit\Framework\TestCase
  11. {
  12. /**
  13. * @var \Magento\Theme\Model\Design\Config\Storage
  14. */
  15. private $storage;
  16. protected function setUp()
  17. {
  18. $this->storage = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
  19. \Magento\Theme\Model\Design\Config\Storage::class
  20. );
  21. }
  22. /**
  23. * Test design/header/welcome if it is saved in db as empty(null) it should be shown on backend as empty.
  24. *
  25. * @magentoDataFixture Magento/Theme/_files/config_data.php
  26. */
  27. public function testLoad()
  28. {
  29. $data = $this->storage->load('stores', 1);
  30. foreach ($data->getExtensionAttributes()->getDesignConfigData() as $configData) {
  31. if ($configData->getPath() == 'design/header/welcome') {
  32. $this->assertSame('', $configData->getValue());
  33. }
  34. }
  35. }
  36. }