Skip to content

Commit c590741

Browse files
committed
test: update test code
1 parent 2477eed commit c590741

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/system/Config/DotEnvTest.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use CodeIgniter\Test\CIUnitTestCase;
1717
use org\bovigo\vfs\vfsStream;
1818
use org\bovigo\vfs\vfsStreamDirectory;
19+
use TypeError;
1920

2021
/**
2122
* @backupGlobals enabled
@@ -112,12 +113,9 @@ public function testLoadsBase64(): void
112113

113114
public function testLoadsNoneStringFiles(): void
114115
{
115-
$dotenv = new DotEnv($this->fixturesFolder, 2);
116-
$dotenv->load();
117-
$this->assertSame('bar', getenv('FOO'));
118-
$this->assertSame('baz', getenv('BAR'));
119-
$this->assertSame('with spaces', getenv('SPACED'));
120-
$this->assertSame('', getenv('NULL'));
116+
$this->expectException(TypeError::class);
117+
118+
new DotEnv($this->fixturesFolder, 2);
121119
}
122120

123121
public function testCommentedLoadsVars(): void

0 commit comments

Comments
 (0)