1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 17:56:52 +02:00

[ticket/16549] Fix tests

PHPBB3-16549
This commit is contained in:
rxu
2020-08-10 15:02:25 +07:00
parent fc631040fd
commit ec565de6cb
43 changed files with 334 additions and 51 deletions

View File

@@ -117,8 +117,10 @@ class phpbb_functional_acp_groups_test extends phpbb_functional_common_groups_te
else
{
$this->form_data = $form->getValues();
$this->assertEquals($tick_legend, $this->form_data['group_legend']);
$this->assertEquals($tick_teampage, $this->form_data['group_teampage']);
// form_data[] values can be bool or null if not ticked, $tick_* value can be bool or null if not set.
// Cast both to the same type to correctly compare the values.
$this->assertEquals((bool) $tick_legend, (bool) ($this->form_data['group_legend'] ?? false));
$this->assertEquals((bool) $tick_teampage, (bool) ($this->form_data['group_teampage'] ?? false));
}
}
}