Merge pull request #605 from ArthurHoaro/clean-phpunit

Hide expected 'error_log' while running TU (clean PHPUnit log)
This commit is contained in:
Arthur 2016-07-23 14:20:23 +02:00 committed by GitHub
commit 2795cf5e1c
2 changed files with 6 additions and 0 deletions

View 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);
}
/**

View File

@ -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);
}
/**