1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/16924] Add test to cover potential escaping of json values

PHPBB3-16924
This commit is contained in:
Marc Alexander
2021-12-02 20:59:06 +01:00
parent 39905eaf4b
commit 03b36d46c3
2 changed files with 18 additions and 0 deletions

View File

@@ -46,6 +46,13 @@ class phpbb_config_db_text_test extends phpbb_database_test_case
$this->assertSame('phpbb', $this->config_text->get('barz'));
}
public function test_set_new_get_json()
{
$json_value = '{"menu":{"id":"file","value":"File"}}';
$this->config_text->set('foobar_json', $json_value);
$this->assertEquals($json_value, $this->config_text->get('foobar_json'));
}
public function test_set_replace_get()
{
$this->config_text->set('foo', '24');