aboutsummaryrefslogtreecommitdiffstats
path: root/tests/config
diff options
context:
space:
mode:
authorErik Frèrejean <erikfrerejean@phpbb.com>2011-01-24 15:13:15 +0100
committerErik Frèrejean <erikfrerejean@phpbb.com>2011-04-18 12:28:47 +0200
commit2f67ade05a426d41c95c146a86251d388c718b61 (patch)
treefc7d66ab15fe13018211169ded8e0c4c41afa13e /tests/config
parent6dd0e40d02272fca63b2bc5b3fa727e7a70c5c86 (diff)
downloadforums-2f67ade05a426d41c95c146a86251d388c718b61.tar
forums-2f67ade05a426d41c95c146a86251d388c718b61.tar.gz
forums-2f67ade05a426d41c95c146a86251d388c718b61.tar.bz2
forums-2f67ade05a426d41c95c146a86251d388c718b61.tar.xz
forums-2f67ade05a426d41c95c146a86251d388c718b61.zip
[ticket/10006] Add phpbb_config::delete
Add the missing `phpbb_config::delete` method to the config class PHPBB3-10006
Diffstat (limited to 'tests/config')
-rw-r--r--tests/config/config_test.php9
-rw-r--r--tests/config/db_test.php7
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/config/config_test.php b/tests/config/config_test.php
index 73a365c847..e4444eccda 100644
--- a/tests/config/config_test.php
+++ b/tests/config/config_test.php
@@ -109,4 +109,13 @@ class phpbb_config_test extends phpbb_test_case
$config->increment('foo', 1);
$this->assertEquals(27, $config['foo']);
}
+
+ public function test_delete()
+ {
+ $config = new phpbb_config(array('foo' => 'bar'));
+
+ $this->assertTrue(isset($config['foo']));
+ $config->delete('foo');
+ $this->assertFalse(isset($config['foo']));
+ }
}
diff --git a/tests/config/db_test.php b/tests/config/db_test.php
index e0d5252f19..d37b31dbbd 100644
--- a/tests/config/db_test.php
+++ b/tests/config/db_test.php
@@ -125,4 +125,11 @@ class phpbb_config_db_test extends phpbb_database_test_case
$this->config->increment('foobar', 3);
$this->assertEquals(3, $this->config['foobar']);;
}
+
+ public function test_delete()
+ {
+ $this->assertTrue(isset($this->config['foo']));
+ $this->config->delete('foo', false);
+ $this->assertFalse(isset($this->config['foo']));
+ }
}