aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-11-02 18:12:50 +0100
committerJoas Schilling <nickvergessen@gmx.de>2013-11-02 18:12:50 +0100
commita175b091b9066478900d4a1a92c3e67f33cd9b33 (patch)
treec061c7c505295fe70ac196339fff33b8cece1f28
parent8a78699f6c5e51465e8d066a4683b5f09a31eea1 (diff)
downloadforums-a175b091b9066478900d4a1a92c3e67f33cd9b33.tar
forums-a175b091b9066478900d4a1a92c3e67f33cd9b33.tar.gz
forums-a175b091b9066478900d4a1a92c3e67f33cd9b33.tar.bz2
forums-a175b091b9066478900d4a1a92c3e67f33cd9b33.tar.xz
forums-a175b091b9066478900d4a1a92c3e67f33cd9b33.zip
[ticket/11995] Add unit test for reverting config.remove
PHPBB3-11995
-rw-r--r--tests/dbal/migrator_tool_config_test.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/dbal/migrator_tool_config_test.php b/tests/dbal/migrator_tool_config_test.php
index a8d8966839..d007e36da1 100644
--- a/tests/dbal/migrator_tool_config_test.php
+++ b/tests/dbal/migrator_tool_config_test.php
@@ -94,6 +94,7 @@ class phpbb_dbal_migrator_tool_config_test extends phpbb_test_case
public function test_reverse()
{
+ // add
$this->config->set('foo', 'bar');
try
@@ -106,6 +107,21 @@ class phpbb_dbal_migrator_tool_config_test extends phpbb_test_case
}
$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');
try