diff options
author | Nils Adermann <naderman@naderman.de> | 2011-01-11 23:55:10 +0100 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2011-01-12 00:21:12 +0100 |
commit | 129d3c53bc6f826ae9a9d484fda4f38f6963b375 (patch) | |
tree | 59f8fdb8586dff175c6eccbbe2661a3cc56d0aad /tests/config/db_test.php | |
parent | 6b1e343d8dae618afd0cb04173749f005c10e376 (diff) | |
download | forums-129d3c53bc6f826ae9a9d484fda4f38f6963b375.tar forums-129d3c53bc6f826ae9a9d484fda4f38f6963b375.tar.gz forums-129d3c53bc6f826ae9a9d484fda4f38f6963b375.tar.bz2 forums-129d3c53bc6f826ae9a9d484fda4f38f6963b375.tar.xz forums-129d3c53bc6f826ae9a9d484fda4f38f6963b375.zip |
[task/config-class] Correctly merge cached config with dynamically loaded data.
PHPBB3-9988
Diffstat (limited to 'tests/config/db_test.php')
-rw-r--r-- | tests/config/db_test.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/config/db_test.php b/tests/config/db_test.php index 07f3bf8d5a..e291c05c8f 100644 --- a/tests/config/db_test.php +++ b/tests/config/db_test.php @@ -35,6 +35,17 @@ class phpbb_config_db_test extends phpbb_database_test_case $this->assertEquals('42', $this->config['bar']); } + public function test_load_cached() + { + $cache = new phpbb_mock_cache(array('config' => array('x' => 'y'))); + $this->config = new phpbb_config_db($this->db, $cache, 'phpbb_config'); + + $this->assertTrue(!isset($this->config['foo'])); + $this->assertEquals('42', $this->config['bar']); + + $this->assertEquals('y', $this->config['x']); + } + public function test_offset_set() { $this->config['foo'] = 'x'; // temporary set |