23 lines
616 B
PHP
23 lines
616 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
putenv('JOBcard_TEST_VALUE=present');
|
|
require_once __DIR__ . '/../config/bootstrap.php';
|
|
|
|
$checks = 0;
|
|
assert(env_required('JOBcard_TEST_VALUE') === 'present');
|
|
$checks++;
|
|
assert(e('<script>alert("x")</script>') === '<script>alert("x")</script>');
|
|
$checks++;
|
|
|
|
$missingRaised = false;
|
|
try {
|
|
env_required('JOBcard_MISSING_VALUE');
|
|
} catch (RuntimeException $exception) {
|
|
$missingRaised = str_contains($exception->getMessage(), 'JOBcard_MISSING_VALUE');
|
|
}
|
|
assert($missingRaised === true);
|
|
$checks++;
|
|
|
|
printf("Foundation smoke tests: %d passed\n", $checks);
|