diff --git a/tests/system/Encryption/EncryptionTest.php b/tests/system/Encryption/EncryptionTest.php index 48fd6dc78e73..0d99b78ec5b4 100644 --- a/tests/system/Encryption/EncryptionTest.php +++ b/tests/system/Encryption/EncryptionTest.php @@ -35,13 +35,9 @@ public static function setUpBeforeClass(): void CodeIgniterServices::injectMock('superglobals', new Superglobals()); - if (is_file(ROOTPATH . '.env')) { - rename(ROOTPATH . '.env', ROOTPATH . '.env.bak'); - - putenv('encryption.key'); - unset($_ENV['encryption.key']); - service('superglobals')->unsetServer('encryption.key'); - } + putenv('encryption.key'); + unset($_ENV['encryption.key']); + service('superglobals')->unsetServer('encryption.key'); } protected function setUp(): void @@ -51,15 +47,6 @@ protected function setUp(): void $this->encryption = new Encryption(); } - public static function tearDownAfterClass(): void - { - parent::tearDownAfterClass(); - - if (is_file(ROOTPATH . '.env.bak')) { - rename(ROOTPATH . '.env.bak', ROOTPATH . '.env'); - } - } - /** * Covers behavior with config encryption key set or not */