]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/ApplicationUtilsTest.php
Updater: keep custom theme preference with the new theme setting
[github/shaarli/Shaarli.git] / tests / ApplicationUtilsTest.php
index c37a94f0944f08f9da242cdadf6211d8a6619835..634bd0eda01a76848ef80058aadcfc4db71e6d1c 100644 (file)
@@ -75,9 +75,12 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
      */
     public function testGetLatestGitVersionCodeInvalidUrl()
     {
+        $oldlog = ini_get('error_log');
+        ini_set('error_log', '/dev/null');
         $this->assertFalse(
             ApplicationUtils::getLatestGitVersionCode('htttp://null.io', 1)
         );
+        ini_set('error_log', $oldlog);
     }
 
     /**
@@ -286,6 +289,7 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
         $conf->set('resource.page_cache', 'pagecache');
         $conf->set('resource.raintpl_tmp', 'tmp');
         $conf->set('resource.raintpl_tpl', 'tpl');
+        $conf->set('resource.theme', 'default');
         $conf->set('resource.update_check', 'data/lastupdatecheck.txt');
 
         $this->assertEquals(
@@ -309,10 +313,12 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
         $conf->set('resource.page_cache', 'null/pagecache');
         $conf->set('resource.raintpl_tmp', 'null/tmp');
         $conf->set('resource.raintpl_tpl', 'null/tpl');
+        $conf->set('resource.raintpl_theme', 'null/tpl/default');
         $conf->set('resource.update_check', 'null/data/lastupdatecheck.txt');
         $this->assertEquals(
             array(
                 '"null/tpl" directory is not readable',
+                '"null/tpl/default" directory is not readable',
                 '"null/cache" directory is not readable',
                 '"null/cache" directory is not writable',
                 '"null/data" directory is not readable',