Skip to content

Commit

Permalink
Hide expected 'error_log' while running TU (clean PHPUnit log)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurHoaro committed Aug 5, 2016
1 parent 76504b4 commit e454467
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/ApplicationUtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
3 changes: 3 additions & 0 deletions tests/CacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit e454467

Please sign in to comment.