UpdaterTest: ensure PHP 5.3 compatibility

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
VirtualTam 2017-03-04 09:52:48 +01:00
parent 6b7ddb4871
commit 8868f3ca46

View file

@ -396,8 +396,8 @@ public function testEscapeMarkdownSettingToFalse()
copy(self::$configFile . '.json.php', $sandboxConf . '.json.php');
$this->conf = new ConfigManager($sandboxConf);
$this->conf->set('general.enabled_plugins', ['markdown']);
$updater = new Updater([], [], $this->conf, true);
$this->conf->set('general.enabled_plugins', array('markdown'));
$updater = new Updater(array(), array(), $this->conf, true);
$this->assertTrue($updater->updateMethodEscapeMarkdown());
$this->assertFalse($this->conf->get('security.markdown_escape'));
@ -416,8 +416,8 @@ public function testEscapeMarkdownSettingToTrue()
copy(self::$configFile . '.json.php', $sandboxConf . '.json.php');
$this->conf = new ConfigManager($sandboxConf);
$this->conf->set('general.enabled_plugins', []);
$updater = new Updater([], [], $this->conf, true);
$this->conf->set('general.enabled_plugins', array());
$updater = new Updater(array(), array(), $this->conf, true);
$this->assertTrue($updater->updateMethodEscapeMarkdown());
$this->assertTrue($this->conf->get('security.markdown_escape'));
@ -435,7 +435,7 @@ public function testEscapeMarkdownSettingNothingToDoEnabled()
copy(self::$configFile . '.json.php', $sandboxConf . '.json.php');
$this->conf = new ConfigManager($sandboxConf);
$this->conf->set('security.markdown_escape', true);
$updater = new Updater([], [], $this->conf, true);
$updater = new Updater(array(), array(), $this->conf, true);
$this->assertTrue($updater->updateMethodEscapeMarkdown());
$this->assertTrue($this->conf->get('security.markdown_escape'));
}
@ -446,7 +446,7 @@ public function testEscapeMarkdownSettingNothingToDoEnabled()
public function testEscapeMarkdownSettingNothingToDoDisabled()
{
$this->conf->set('security.markdown_escape', false);
$updater = new Updater([], [], $this->conf, true);
$updater = new Updater(array(), array(), $this->conf, true);
$this->assertTrue($updater->updateMethodEscapeMarkdown());
$this->assertFalse($this->conf->get('security.markdown_escape'));
}