From 6309ffd1b7c678568705f1cf0fb5e44ea0fb3c22 Mon Sep 17 00:00:00 2001 From: Mikael Pajunen Date: Sat, 3 Jan 2015 11:52:38 +0200 Subject: [PATCH] Use $this->iniSet() in tests --- .../Component/Debug/Tests/DebugClassLoaderTest.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php b/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php index 396cc98ee9..775f3329c2 100644 --- a/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php +++ b/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php @@ -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);