1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +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));
}
}
}

View File

@@ -80,6 +80,6 @@ class phpbb_functional_avatar_acp_groups_test extends phpbb_functional_common_av
$crawler = self::request('GET', $this->get_url() . '&sid=' . $this->sid);
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
$form_data = $form->getValues();
$this->assertEmpty($form_data['avatar_type']);
$this->assertFalse(isset($form_data['avatar_type']));
}
}

View File

@@ -39,7 +39,7 @@ class phpbb_functional_smilies_test extends phpbb_functional_test_case
$crawler = self::request('GET', 'posting.php?mode=smilies');
foreach ($smilies as $index => $smiley)
{
$this->assertContains($smiley['smiley_url'],
$this->assertStringContainsString($smiley['smiley_url'],
$crawler->filter('div[class="inner"] > a > img')->eq($index)->attr('src')
);
}