ConfigLoaderTest.php 886 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\App\ObjectManager;
  7. use Magento\TestFramework\Helper\CacheCleaner;
  8. class ConfigLoaderTest extends \PHPUnit\Framework\TestCase
  9. {
  10. /**
  11. * @var \Magento\Framework\App\ObjectManager\ConfigLoader
  12. */
  13. private $object;
  14. protected function setUp()
  15. {
  16. $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
  17. $this->object = $objectManager->create(
  18. \Magento\Framework\App\ObjectManager\ConfigLoader::class
  19. );
  20. }
  21. public function testLoad()
  22. {
  23. CacheCleaner::cleanAll();
  24. $data = $this->object->load('global');
  25. $this->assertNotEmpty($data);
  26. $cachedData = $this->object->load('global');
  27. $this->assertEquals($data, $cachedData);
  28. }
  29. }