Browse Source

DX: UtilsTest - add missing teardown

Dariusz Ruminski 3 years ago
parent
commit
cbd400e210
1 changed files with 12 additions and 0 deletions
  1. 12 0
      tests/UtilsTest.php

+ 12 - 0
tests/UtilsTest.php

@@ -30,6 +30,18 @@ final class UtilsTest extends TestCase
 {
     use ExpectDeprecationTrait;
 
+    private $originalValueOfFutureMode;
+
+    protected function doSetUp()
+    {
+        $this->originalValueOfFutureMode = getenv('PHP_CS_FIXER_FUTURE_MODE');
+    }
+
+    protected function doTearDown()
+    {
+        putenv("PHP_CS_FIXER_FUTURE_MODE={$this->originalValueOfFutureMode}");
+    }
+
     /**
      * @param string $expected Camel case string
      * @param string $input    Input string