mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-12-29 13:15:44 +01:00
apply StyleCI recommendation
This commit is contained in:
parent
2b76898546
commit
93bc122086
1 changed files with 4 additions and 3 deletions
|
@ -120,14 +120,15 @@ class ConfigurationTest extends TestCase
|
||||||
unset($options['expire_options']['1week']);
|
unset($options['expire_options']['1week']);
|
||||||
unset($options['expire_options']['1year']);
|
unset($options['expire_options']['1year']);
|
||||||
unset($options['expire_options']['never']);
|
unset($options['expire_options']['never']);
|
||||||
$valid_sri = $options['sri'][array_key_first($options['sri'])];
|
$sri_key = array_key_first($options['sri']);
|
||||||
$options['sri'][array_key_first($options['sri'])] = ''; // empty string should get replaced with default
|
$valid_sri = $options['sri'][$sri_key];
|
||||||
|
$options['sri'][$sri_key] = ''; // empty string should get replaced with default
|
||||||
$options['sri']['js/example.js'] = 'some invalid SRI hash';
|
$options['sri']['js/example.js'] = 'some invalid SRI hash';
|
||||||
Helper::createIniFile(CONF, $options);
|
Helper::createIniFile(CONF, $options);
|
||||||
$conf = new Configuration;
|
$conf = new Configuration;
|
||||||
// restore expected results
|
// restore expected results
|
||||||
$options['expire']['default'] = '5min';
|
$options['expire']['default'] = '5min';
|
||||||
$options['sri'][array_key_first($options['sri'])] = $valid_sri;
|
$options['sri'][$sri_key] = $valid_sri;
|
||||||
$this->assertEquals($options, $conf->get(), 'not overriding "missing" subkeys');
|
$this->assertEquals($options, $conf->get(), 'not overriding "missing" subkeys');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue