ConfigTest.php 890 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Theme\Test\Unit\Model\Theme\Customization;
  7. use \Magento\Theme\Model\Theme\Customization\Config;
  8. class ConfigTest extends \PHPUnit\Framework\TestCase
  9. {
  10. public function testGetFileTypes()
  11. {
  12. $expected = [
  13. 'key' => 'value',
  14. 'key1' => 'value1',
  15. ];
  16. $config = $this->getMockBuilder(\Magento\Framework\App\Config\ScopeConfigInterface::class)->getMock();
  17. $config->expects($this->once())
  18. ->method('getValue')
  19. ->with(Config::XML_PATH_CUSTOM_FILES, 'default')
  20. ->willReturn($expected);
  21. /** @var \Magento\Framework\App\Config\ScopeConfigInterface $config */
  22. $object = new Config($config);
  23. $this->assertEquals($expected, $object->getFileTypes());
  24. }
  25. }