From 227ba8dcc44e71a30f607d3e9e63bfe467ab4e50 Mon Sep 17 00:00:00 2001 From: Mike Cochrane Date: Thu, 30 Mar 2017 13:54:53 +1300 Subject: [PATCH] FIX illegal_extensions in unit tests not being removed --- src/Dev/SapphireTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Dev/SapphireTest.php b/src/Dev/SapphireTest.php index f49070991..66a24fc78 100644 --- a/src/Dev/SapphireTest.php +++ b/src/Dev/SapphireTest.php @@ -356,15 +356,15 @@ class SapphireTest extends PHPUnit_Framework_TestCase continue; } foreach ($extensions as $extension) { - if (!class_exists($extension) ||$class::has_extension($extension)) { + if (!class_exists($extension) || !$class::has_extension($extension)) { continue; - }if (!isset(self::$extensions_to_reapply[$class])) { - self::$extensions_to_reapply[$class] = array(); - } - self::$extensions_to_reapply[$class][] = $extension; - $class::remove_extension($extension); - $isAltered = true; - + } + if (!isset(self::$extensions_to_reapply[$class])) { + self::$extensions_to_reapply[$class] = array(); + } + self::$extensions_to_reapply[$class][] = $extension; + $class::remove_extension($extension); + $isAltered = true; } }