20 private $deploymentConfigMock;
30 private $configDataMock;
34 $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
36 $this->deploymentConfigMock = $this->getMockBuilder(DeploymentConfig::class)
37 ->disableOriginalConstructor()
40 $this->configDataMock = $this->getMockBuilder(ConfigData::class)
41 ->disableOriginalConstructor()
45 $configDataFactoryMock = $this->getMockBuilder(ConfigDataFactory::class)
46 ->disableOriginalConstructor()
47 ->setMethods([
'create'])
50 $configDataFactoryMock->method(
'create')
51 ->willReturn($this->configDataMock);
54 ConfigGenerator::class,
56 'deploymentConfig' => $this->deploymentConfigMock,
57 'configDataFactory' => $configDataFactoryMock,
64 $this->deploymentConfigMock->expects($this->atLeastOnce())
70 ->expects($this->once())
74 $this->model->createXFrameConfig();
82 'host' =>
'localhost',
86 'host' =>
'website.com',
89 'host' =>
'120.0.0.1',
95 ->expects($this->once())
99 $this->model->createCacheHostsConfig(
$data);
104 $this->deploymentConfigMock->expects($this->once())
109 $this->configDataMock
110 ->expects($this->once())
114 $this->model->createModeConfig();
119 $this->deploymentConfigMock->expects($this->once())
132 $this->deploymentConfigMock
137 $this->configDataMock
138 ->expects($this->once())
142 $this->model->createCryptConfig(
$data);
const CONFIG_PATH_CRYPT_KEY
const INPUT_KEY_CACHE_HOSTS
testCreateCacheHostsConfig()
testCreateCryptKeyConfig()
const CONFIG_PATH_X_FRAME_OPT
const CONFIG_PATH_CACHE_HOSTS
testCreateModeConfigIfAlreadySet()
const INPUT_KEY_ENCRYPTION_KEY