Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
Test for request #16724: lowercase constant names option
3
--FILE--
4
<?php
5
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'setup.php.inc';
6
$datasrc = dirname(__FILE__) . '/bug16724-config.php';
7
$root = $config->parseConfig(
8
    $datasrc, 'phpconstants',
9
    array('lowercase' => true)
10
);
11
print_r($root->toArray());
12
echo $root->toString('phpconstants');
13
 
14
//not lowercasing should still work
15
$config = new Config();
16
$root = $config->parseConfig(
17
    $datasrc, 'phpconstants'
18
);
19
print_r($root->toArray());
20
?>
21
--EXPECT--
22
Array
23
(
24
    [root] => Array
25
        (
26
            [my_config_option] => foo
27
            [host12_3] => foo
28
        )
29
 
30
)
31
define('MY_CONFIG_OPTION', 'foo');
32
define('HOST12_3', 'foo');
33
Array
34
(
35
    [root] => Array
36
        (
37
            [MY_CONFIG_OPTION] => foo
38
            [HOST12_3] => foo
39
        )
40
 
41
)
42