assertSame('example', $result); } public function testGetReturnsDefaultIfKeyNotSet(): void { putenv('TEST_KEY'); // Unset the environment variable $result = Env::get('TEST_KEY', 'default_value'); $this->assertSame('default_value', $result); } public function testGetCastsToBoolean(): void { putenv('TEST_KEY=true'); $result = Env::get('TEST_KEY', null, 'bool'); $this->assertTrue($result); } public function testGetCastsToInteger(): void { putenv('TEST_KEY=123'); $result = Env::get('TEST_KEY', null, 'int'); $this->assertSame(123, $result); } public function testGetCastsToFloat(): void { putenv('TEST_KEY=123.45'); $result = Env::get('TEST_KEY', null, 'float'); $this->assertSame(123.45, $result); } }