mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
[ticket/10006] Add phpbb_config::delete
Add the missing `phpbb_config::delete` method to the config class PHPBB3-10006
This commit is contained in:
@@ -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']));
|
||||
}
|
||||
}
|
||||
|
@@ -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']));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user