public function loadEnvVars(): array
{ return [ 'FOO_ENV_LOADER' => '234',
'BAR_ENV_LOADER' => '456',
'BAZ_ENV_LOADER' => '567',
];
} };
};
$processor =
new EnvVarProcessor(new Container(),
new RewindableGenerator($loaders, 2
));
$result =
$processor->
getEnv('string', 'FOO_ENV_LOADER',
function D
) {});
$this->
assertSame('123',
$result);
$result =
$processor->
getEnv('string', 'BAR_ENV_LOADER',
function D
) {});
$this->
assertSame('456',
$result);
$result =
$processor->
getEnv('string', 'BAZ_ENV_LOADER',
function D
) {});
$this->
assertSame('567',
$result);
$result =
$processor->
getEnv('string', 'BUZ_ENV_LOADER',
function D
) {});