@@ -92,10 +92,11 @@ public function testGetFileWhenStateDeveloper()
92
92
* Cover getFile when mode is default
93
93
* @param string $mode
94
94
* @param integer $onDemandInProduction
95
+ * @param integer $forceMinification
95
96
* @param string $method
96
97
* @dataProvider getMinifiedDataProvider
97
98
*/
98
- public function testGetFileWhenModifiedNeeded ($ mode , $ onDemandInProduction , $ method )
99
+ public function testGetFileWhenModifiedNeeded ($ mode , $ onDemandInProduction , $ forceMinification , $ method )
99
100
{
100
101
$ this ->assetConfig
101
102
->expects ($ this ->once ())
@@ -108,8 +109,10 @@ public function testGetFileWhenModifiedNeeded($mode, $onDemandInProduction, $met
108
109
109
110
$ this ->deploymentConfigMock ->expects ($ this ->any ())
110
111
->method ('getConfigData ' )
111
- ->with (ConfigOptionsListConstants::CONFIG_PATH_SCD_ON_DEMAND_IN_PRODUCTION )
112
- ->willReturn ($ onDemandInProduction );
112
+ ->willReturnMap ([
113
+ [ConfigOptionsListConstants::CONFIG_PATH_SCD_ON_DEMAND_IN_PRODUCTION , $ onDemandInProduction ],
114
+ [ConfigOptionsListConstants::CONFIG_PATH_FORCE_HTML_MINIFICATION , $ forceMinification ],
115
+ ]);
113
116
$ this ->state ->expects ($ this ->once ())
114
117
->method ('getMode ' )
115
118
->willReturn ($ mode );
@@ -156,10 +159,11 @@ public function testGetFileIfMinificationIsDisabled()
156
159
public function getMinifiedDataProvider ()
157
160
{
158
161
return [
159
- 'default with on demand ' => [State::MODE_DEFAULT , 1 , 'getMinified ' ],
160
- 'default without on demand ' => [State::MODE_DEFAULT , 0 , 'getMinified ' ],
161
- 'production with on demand ' => [State::MODE_PRODUCTION , 1 , 'getMinified ' ],
162
- 'production without on demand ' => [State::MODE_PRODUCTION , 0 , 'getPathToMinified ' ],
162
+ 'default with on demand ' => [State::MODE_DEFAULT , 1 , 1 , 'getMinified ' ],
163
+ 'default without on demand ' => [State::MODE_DEFAULT , 0 , 0 , 'getMinified ' ],
164
+ 'production with on demand ' => [State::MODE_PRODUCTION , 1 , 0 , 'getMinified ' ],
165
+ 'production without on demand ' => [State::MODE_PRODUCTION , 0 , 0 , 'getPathToMinified ' ],
166
+ 'production without on demand with minified ' => [State::MODE_PRODUCTION , 0 , 1 , 'getMinified ' ],
163
167
];
164
168
}
165
169
}
0 commit comments