'value', 'key1' => 'value1', ]; $config = $this->getMockBuilder(\Magento\Framework\App\Config\ScopeConfigInterface::class)->getMock(); $config->expects($this->once()) ->method('getValue') ->with(Config::XML_PATH_CUSTOM_FILES, 'default') ->willReturn($expected); /** @var \Magento\Framework\App\Config\ScopeConfigInterface $config */ $object = new Config($config); $this->assertEquals($expected, $object->getFileTypes()); } }