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 @@ public function testGetLatestGitVersionCode()
*/
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 @@ public function testPurgeCachedPages()
*/
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);
}
/**