aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthur <arthur@hoa.ro>2016-07-23 14:20:23 +0200
committerGitHub <noreply@github.com>2016-07-23 14:20:23 +0200
commit2795cf5e1cbe06af418c8a9f57b2c368ac0533ae (patch)
tree252f11084266200e24518e08bc6c73c37558751c
parenta4cd07eee24fc5d4bcda1ab314731abe7624c51d (diff)
parent87f9f4f9b7f3fa1aa51aa4e3cfa9f36680972e4e (diff)
downloadShaarli-2795cf5e1cbe06af418c8a9f57b2c368ac0533ae.tar.gz
Shaarli-2795cf5e1cbe06af418c8a9f57b2c368ac0533ae.tar.zst
Shaarli-2795cf5e1cbe06af418c8a9f57b2c368ac0533ae.zip
Merge pull request #605 from ArthurHoaro/clean-phpunit
Hide expected 'error_log' while running TU (clean PHPUnit log)
-rw-r--r--tests/ApplicationUtilsTest.php3
-rw-r--r--tests/CacheTest.php3
2 files changed, 6 insertions, 0 deletions
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
75 */ 75 */
76 public function testGetLatestGitVersionCodeInvalidUrl() 76 public function testGetLatestGitVersionCodeInvalidUrl()
77 { 77 {
78 $oldlog = ini_get('error_log');
79 ini_set('error_log', '/dev/null');
78 $this->assertFalse( 80 $this->assertFalse(
79 ApplicationUtils::getLatestGitVersionCode('htttp://null.io', 1) 81 ApplicationUtils::getLatestGitVersionCode('htttp://null.io', 1)
80 ); 82 );
83 ini_set('error_log', $oldlog);
81 } 84 }
82 85
83 /** 86 /**
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
64 */ 64 */
65 public function testPurgeCachedPagesMissingDir() 65 public function testPurgeCachedPagesMissingDir()
66 { 66 {
67 $oldlog = ini_get('error_log');
68 ini_set('error_log', '/dev/null');
67 $this->assertEquals( 69 $this->assertEquals(
68 'Cannot purge sandbox/dummycache_missing: no directory', 70 'Cannot purge sandbox/dummycache_missing: no directory',
69 purgeCachedPages(self::$testCacheDir.'_missing') 71 purgeCachedPages(self::$testCacheDir.'_missing')
70 ); 72 );
73 ini_set('error_log', $oldlog);
71 } 74 }
72 75
73 /** 76 /**