Use $this->iniSet() in tests
This commit is contained in:
parent
27176d9b3d
commit
6309ffd1b7
@ -62,17 +62,14 @@ class DebugClassLoaderTest extends \PHPUnit_Framework_TestCase
|
||||
public function testUnsilencing()
|
||||
{
|
||||
ob_start();
|
||||
$bak = array(
|
||||
ini_set('log_errors', 0),
|
||||
ini_set('display_errors', 1),
|
||||
);
|
||||
|
||||
$this->iniSet('log_errors', 0);
|
||||
$this->iniSet('display_errors', 1);
|
||||
|
||||
// See below: this will fail with parse error
|
||||
// but this should not be @-silenced.
|
||||
@class_exists(__NAMESPACE__.'\TestingUnsilencing', true);
|
||||
|
||||
ini_set('log_errors', $bak[0]);
|
||||
ini_set('display_errors', $bak[1]);
|
||||
$output = ob_get_clean();
|
||||
|
||||
$this->assertStringMatchesFormat('%aParse error%a', $output);
|
||||
|
Reference in New Issue
Block a user