refactor: support portable PHP hosting without Docker
This commit is contained in:
@@ -4,6 +4,14 @@ declare(strict_types=1);
|
||||
putenv('JOBcard_TEST_VALUE=present');
|
||||
require_once __DIR__ . '/../config/bootstrap.php';
|
||||
|
||||
$tempEnv = tempnam(sys_get_temp_dir(), 'jobcard-env-');
|
||||
file_put_contents($tempEnv, "JOBcard_LOADED=\"from-file\"\n# ignored\n");
|
||||
load_dotenv($tempEnv);
|
||||
unlink($tempEnv);
|
||||
if (getenv('JOBcard_LOADED') !== 'from-file') {
|
||||
throw new RuntimeException('Expected .env values to load from file');
|
||||
}
|
||||
|
||||
$checks = 0;
|
||||
assert(env_required('JOBcard_TEST_VALUE') === 'present');
|
||||
$checks++;
|
||||
|
||||
Reference in New Issue
Block a user