aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2011-04-24 17:31:33 +0200
committerAndreas Fischer <bantu@phpbb.com>2011-04-24 17:31:33 +0200
commit1ec2ab6689c8498ef02a3ed309e8421a437b0365 (patch)
tree725f533f0c13fdd4d60f9526a9976720571f5818
parent513b95642eab7f8092d651a21045dc4bb1556148 (diff)
parent5e7c945de99b3c4201378164cded0df667793add (diff)
downloadforums-1ec2ab6689c8498ef02a3ed309e8421a437b0365.tar
forums-1ec2ab6689c8498ef02a3ed309e8421a437b0365.tar.gz
forums-1ec2ab6689c8498ef02a3ed309e8421a437b0365.tar.bz2
forums-1ec2ab6689c8498ef02a3ed309e8421a437b0365.tar.xz
forums-1ec2ab6689c8498ef02a3ed309e8421a437b0365.zip
Merge remote branch 'p/ticket/10143' into develop
* p/ticket/10143: [ticket/10143] Added tests for storing a previously deleted value in db cache.
-rw-r--r--tests/config/db_test.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/config/db_test.php b/tests/config/db_test.php
index 5bd5296e5a..e817545a54 100644
--- a/tests/config/db_test.php
+++ b/tests/config/db_test.php
@@ -139,4 +139,28 @@ class phpbb_config_db_test extends phpbb_database_test_case
$cache2->checkVarUnset($this, 'foo');
$this->assertFalse(isset($config2['foo']));
}
+
+ public function test_delete_write_read_not_cacheable()
+ {
+ // bar is dynamic
+ $this->assertTrue(isset($this->config['bar']));
+ $this->config->delete('bar');
+ $this->cache->checkVarUnset($this, 'bar');
+ $this->assertFalse(isset($this->config['bar']));
+
+ $this->config->set('bar', 'new bar', false);
+ $this->assertEquals('new bar', $this->config['bar']);
+ }
+
+ public function test_delete_write_read_cacheable()
+ {
+ // foo is not dynamic
+ $this->assertTrue(isset($this->config['foo']));
+ $this->config->delete('foo');
+ $this->cache->checkVarUnset($this, 'foo');
+ $this->assertFalse(isset($this->config['foo']));
+
+ $this->config->set('foo', 'new foo', true);
+ $this->assertEquals('new foo', $this->config['foo']);
+ }
}