mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
[ticket/11995] Add unit test for reverting config.remove
PHPBB3-11995
This commit is contained in:
parent
8a78699f6c
commit
a175b091b9
1 changed files with 16 additions and 0 deletions
|
@ -94,6 +94,7 @@ class phpbb_dbal_migrator_tool_config_test extends phpbb_test_case
|
||||||
|
|
||||||
public function test_reverse()
|
public function test_reverse()
|
||||||
{
|
{
|
||||||
|
// add
|
||||||
$this->config->set('foo', 'bar');
|
$this->config->set('foo', 'bar');
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -106,6 +107,21 @@ class phpbb_dbal_migrator_tool_config_test extends phpbb_test_case
|
||||||
}
|
}
|
||||||
$this->assertFalse(isset($this->config['foo']));
|
$this->assertFalse(isset($this->config['foo']));
|
||||||
|
|
||||||
|
// remove
|
||||||
|
$this->config->delete('foo');
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$this->tool->reverse('remove', 'foo');
|
||||||
|
}
|
||||||
|
catch (Exception $e)
|
||||||
|
{
|
||||||
|
$this->fail($e);
|
||||||
|
}
|
||||||
|
$this->assertTrue(isset($this->config['foo']));
|
||||||
|
$this->assertEquals('', $this->config['foo']);
|
||||||
|
|
||||||
|
// update_if_equals
|
||||||
$this->config->set('foo', 'bar');
|
$this->config->set('foo', 'bar');
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
Loading…
Add table
Reference in a new issue