diff --git a/tests/system/Config/DotEnvTest.php b/tests/system/Config/DotEnvTest.php index c20a37399315..6348b1567a59 100644 --- a/tests/system/Config/DotEnvTest.php +++ b/tests/system/Config/DotEnvTest.php @@ -16,6 +16,7 @@ use CodeIgniter\Test\CIUnitTestCase; use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStreamDirectory; +use TypeError; /** * @backupGlobals enabled @@ -112,12 +113,9 @@ public function testLoadsBase64(): void public function testLoadsNoneStringFiles(): void { - $dotenv = new DotEnv($this->fixturesFolder, 2); - $dotenv->load(); - $this->assertSame('bar', getenv('FOO')); - $this->assertSame('baz', getenv('BAR')); - $this->assertSame('with spaces', getenv('SPACED')); - $this->assertSame('', getenv('NULL')); + $this->expectException(TypeError::class); + + new DotEnv($this->fixturesFolder, 2); } public function testCommentedLoadsVars(): void