Skip to content

Commit 56b3b0c

Browse files
committed
[Runtime] Fix test for env var names
1 parent 1e842fa commit 56b3b0c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Tests/phpt/runtime-options.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<?php
22

33
$_SERVER['APP_RUNTIME_OPTIONS'] = [
4-
'env_var_names' => [
5-
'env_key' => 'ENV_MODE',
6-
'debug_key' => 'DEBUG_MODE',
7-
],
4+
'env_var_name' => 'ENV_MODE',
5+
'debug_var_name' => 'DEBUG_MODE',
86
];
97
require __DIR__.'/autoload.php';
108

119
return function (array $context): void {
12-
echo 'Env mode ', $context['ENV_MODE'], ', debug mode ', $context['DEBUG_MODE'];
10+
if (isset($context['APP_ENV']) || isset($context['APP_DEBUG'])) {
11+
echo 'An error occurred on the variable name options.';
12+
} else {
13+
echo 'Env mode ', $context['ENV_MODE'], ', debug mode ', $context['DEBUG_MODE'];
14+
}
1315
};

0 commit comments

Comments
 (0)