]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
UpdaterTest: ensure PHP 5.3 compatibility v0.8.4
authorVirtualTam <virtualtam@flibidi.net>
Sat, 4 Mar 2017 08:52:48 +0000 (09:52 +0100)
committerVirtualTam <virtualtam@flibidi.net>
Sat, 4 Mar 2017 08:52:48 +0000 (09:52 +0100)
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
tests/Updater/UpdaterTest.php

index 17d1ba81d7f9de5cf009b04ae62fef6606e7c6e4..a3e8a4d291fd4c49a88304052dad16085d281bc7 100644 (file)
@@ -396,8 +396,8 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
         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 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
         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 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
         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 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
     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'));
     }