diff options
Diffstat (limited to 'tests/functional/common_avatar_test.php')
-rw-r--r-- | tests/functional/common_avatar_test.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/functional/common_avatar_test.php b/tests/functional/common_avatar_test.php index 1bb9e5cd8e..82d7136c98 100644 --- a/tests/functional/common_avatar_test.php +++ b/tests/functional/common_avatar_test.php @@ -50,7 +50,7 @@ abstract class phpbb_functional_common_avatar_test extends phpbb_functional_test $this->assertContainsLang('CONFIG_UPDATED', $crawler->text()); } - public function assert_avatar_submit($expected, $type, $data, $button_text = 'SUBMIT') + public function assert_avatar_submit($expected, $type, $data, $delete = false, $button_text = 'SUBMIT') { $crawler = self::request('GET', $this->get_url() . '&sid=' . $this->sid); @@ -72,6 +72,12 @@ abstract class phpbb_functional_common_avatar_test extends phpbb_functional_test $crawler = self::submit($form); + if (is_array($expected)) + { + $delete_expected = $expected[1]; + $expected = $expected[0]; + } + try { $this->assertContainsLang($expected, $crawler->text()); @@ -80,5 +86,12 @@ abstract class phpbb_functional_common_avatar_test extends phpbb_functional_test { $this->assertContains($expected, $crawler->text()); } + + if ($delete) + { + $form = $crawler->selectButton('confirm')->form(); + $crawler = self::submit($form); + $this->assertContainsLang($delete_expected, $crawler->text()); + } } } |