From: Arthur Date: Sat, 23 Jul 2016 12:20:23 +0000 (+0200) Subject: Merge pull request #605 from ArthurHoaro/clean-phpunit X-Git-Tag: v0.8.0~21 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=2795cf5e1cbe06af418c8a9f57b2c368ac0533ae;hp=a4cd07eee24fc5d4bcda1ab314731abe7624c51d;p=github%2Fshaarli%2FShaarli.git Merge pull request #605 from ArthurHoaro/clean-phpunit Hide expected 'error_log' while running TU (clean PHPUnit log) --- diff --git a/tests/ApplicationUtilsTest.php b/tests/ApplicationUtilsTest.php index c37a94f0..861b8d4e 100644 --- a/tests/ApplicationUtilsTest.php +++ b/tests/ApplicationUtilsTest.php @@ -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); } /** diff --git a/tests/CacheTest.php b/tests/CacheTest.php index 26c43225..992e26a5 100644 --- a/tests/CacheTest.php +++ b/tests/CacheTest.php @@ -64,10 +64,13 @@ class CacheTest extends PHPUnit_Framework_TestCase */ public function testPurgeCachedPagesMissingDir() { + $oldlog = ini_get('error_log'); + ini_set('error_log', '/dev/null'); $this->assertEquals( 'Cannot purge sandbox/dummycache_missing: no directory', purgeCachedPages(self::$testCacheDir.'_missing') ); + ini_set('error_log', $oldlog); } /**