![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/framework/View/Test/Unit/Asset/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\Framework\View\Test\Unit\Asset; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\State; use Magento\Framework\TestFramework\Unit\BaseTestCase; use Magento\Framework\View\Asset\Config; use Magento\Store\Model\ScopeInterface; use PHPUnit\Framework\MockObject\MockObject; /** * Tests Magento\Framework\View\Asset\Config */ class ConfigTest extends BaseTestCase { /** * @var MockObject|ScopeConfigInterface */ private $scopeConfigMock; /** * @var Config */ private $model; /** * {@inheritDoc} */ protected function setUp(): void { $this->scopeConfigMock = $this->getMockBuilder(ScopeConfigInterface::class) ->getMockForAbstractClass(); $this->model = new Config($this->scopeConfigMock); } /** * @param bool $booleanData * @dataProvider booleanDataProvider * @return void */ public function testIsMergeCssFiles($booleanData) { $this->scopeConfigMock->expects($this->once()) ->method('isSetFlag') ->with(Config::XML_PATH_MERGE_CSS_FILES, ScopeInterface::SCOPE_STORE) ->willReturn($booleanData); $this->assertSame($booleanData, $this->model->isMergeCssFiles()); } /** * @param bool $booleanData * @dataProvider booleanDataProvider * @return void */ public function testIsMergeJsFiles($booleanData) { $this->scopeConfigMock->expects($this->once()) ->method('isSetFlag') ->with(Config::XML_PATH_MERGE_JS_FILES, ScopeInterface::SCOPE_STORE) ->willReturn($booleanData); $this->assertSame($booleanData, $this->model->isMergeJsFiles()); } }