diff options
Diffstat (limited to 'tests/functional/avatar_acp_test.php')
| -rw-r--r-- | tests/functional/avatar_acp_test.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/functional/avatar_acp_test.php b/tests/functional/avatar_acp_test.php index b359212be2..623911fbf1 100644 --- a/tests/functional/avatar_acp_test.php +++ b/tests/functional/avatar_acp_test.php @@ -29,10 +29,10 @@ class phpbb_functional_avatar_acp_test extends phpbb_functional_test_case $crawler = $this->request('GET', 'adm/index.php?i=acp_board&mode=avatar&sid=' . $this->sid); $this->assert_response_success(); // Check the default entries we should have - $this->assertContains($this->lang('ALLOW_GRAVATAR'), $crawler->text()); - $this->assertContains($this->lang('ALLOW_REMOTE'), $crawler->text()); - $this->assertContains($this->lang('ALLOW_AVATARS'), $crawler->text()); - $this->assertContains($this->lang('ALLOW_LOCAL'), $crawler->text()); + $this->assertContainsLang('ALLOW_GRAVATAR', $crawler->text()); + $this->assertContainsLang('ALLOW_REMOTE', $crawler->text()); + $this->assertContainsLang('ALLOW_AVATARS', $crawler->text()); + $this->assertContainsLang('ALLOW_LOCAL', $crawler->text()); // Now start setting the needed settings $form = $crawler->selectButton($this->lang('SUBMIT'))->form(); @@ -41,7 +41,7 @@ class phpbb_functional_avatar_acp_test extends phpbb_functional_test_case $form['config[allow_avatar_remote]']->select(1); $form['config[allow_avatar_remote_upload]']->select(1); $crawler = $this->client->submit($form); - $this->assertContains($this->lang('CONFIG_UPDATED'), $crawler->text()); + $this->assertContainsLang('CONFIG_UPDATED', $crawler->text()); } public function test_user_acp_settings() @@ -53,7 +53,7 @@ class phpbb_functional_avatar_acp_test extends phpbb_functional_test_case $form = $crawler->selectButton($this->lang('GO'))->form(); $form['mode']->select('avatar'); $crawler = $this->client->submit($form); - $this->assertContains($this->lang('AVATAR_TYPE'), $crawler->text()); + $this->assertContainsLang('AVATAR_TYPE', $crawler->text()); // Test if setting a gravatar avatar properly works $form = $crawler->selectButton($this->lang('SUBMIT'))->form(); @@ -62,7 +62,7 @@ class phpbb_functional_avatar_acp_test extends phpbb_functional_test_case $form['avatar_gravatar_width']->setValue(80); $form['avatar_gravatar_height']->setValue(80); $crawler = $this->client->submit($form); - $this->assertContains($this->lang('USER_AVATAR_UPDATED'), $crawler->text()); + $this->assertContainsLang('USER_AVATAR_UPDATED', $crawler->text()); // Go back to previous page $crawler = $this->request('GET', 'adm/index.php?i=users&u=2&sid=' . $this->sid); @@ -72,7 +72,7 @@ class phpbb_functional_avatar_acp_test extends phpbb_functional_test_case $form = $crawler->selectButton($this->lang('GO'))->form(); $form['mode']->select('avatar'); $crawler = $this->client->submit($form); - $this->assertContains($this->lang('AVATAR_TYPE'), $crawler->text()); + $this->assertContainsLang('AVATAR_TYPE', $crawler->text()); // Test uploading a remote avatar $form = $crawler->selectButton($this->lang('SUBMIT'))->form(); @@ -80,7 +80,7 @@ class phpbb_functional_avatar_acp_test extends phpbb_functional_test_case // use default gravatar supplied by test@example.com and default size = 80px $form['avatar_upload_url']->setValue('https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg'); $crawler = $this->client->submit($form); - $this->assertContains($this->lang('USER_AVATAR_UPDATED'), $crawler->text()); + $this->assertContainsLang('USER_AVATAR_UPDATED', $crawler->text()); // Go back to previous page $crawler = $this->request('GET', 'adm/index.php?i=users&u=2&sid=' . $this->sid); @@ -90,7 +90,7 @@ class phpbb_functional_avatar_acp_test extends phpbb_functional_test_case $form = $crawler->selectButton($this->lang('GO'))->form(); $form['mode']->select('avatar'); $crawler = $this->client->submit($form); - $this->assertContains($this->lang('AVATAR_TYPE'), $crawler->text()); + $this->assertContainsLang('AVATAR_TYPE', $crawler->text()); // Submit gravatar with incorrect email and correct size $form = $crawler->selectButton($this->lang('SUBMIT'))->form(); @@ -99,7 +99,7 @@ class phpbb_functional_avatar_acp_test extends phpbb_functional_test_case $form['avatar_gravatar_width']->setValue(80); $form['avatar_gravatar_height']->setValue(80); $crawler = $this->client->submit($form); - $this->assertContains($this->lang('EMAIL_INVALID_EMAIL'), $crawler->text()); + $this->assertContainsLang('EMAIL_INVALID_EMAIL', $crawler->text()); } public function test_group_acp_settings() @@ -107,7 +107,7 @@ class phpbb_functional_avatar_acp_test extends phpbb_functional_test_case // Test setting group avatar of admin group $crawler = $this->request('GET', 'adm/index.php?i=acp_groups&mode=manage&action=edit&g=5&sid=' . $this->sid); $this->assert_response_success(); - $this->assertContains($this->lang('AVATAR_TYPE'), $crawler->text()); + $this->assertContainsLang('AVATAR_TYPE', $crawler->text()); // Test if setting a gravatar avatar properly works $form = $crawler->selectButton($this->lang('SUBMIT'))->form(); @@ -116,7 +116,7 @@ class phpbb_functional_avatar_acp_test extends phpbb_functional_test_case $form['avatar_gravatar_width']->setValue(80); $form['avatar_gravatar_height']->setValue(80); $crawler = $this->client->submit($form); - $this->assertContains($this->lang('GROUP_UPDATED'), $crawler->text()); + $this->assertContainsLang('GROUP_UPDATED', $crawler->text()); // Go back to previous page $crawler = $this->request('GET', 'adm/index.php?i=acp_groups&mode=manage&action=edit&g=5&sid=' . $this->sid); @@ -128,7 +128,7 @@ class phpbb_functional_avatar_acp_test extends phpbb_functional_test_case // use default gravatar supplied by test@example.com and default size = 80px $form['avatar_upload_url']->setValue('https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg'); $crawler = $this->client->submit($form); - $this->assertContains($this->lang('GROUP_UPDATED'), $crawler->text()); + $this->assertContainsLang('GROUP_UPDATED', $crawler->text()); // Go back to previous page $crawler = $this->request('GET', 'adm/index.php?i=acp_groups&mode=manage&action=edit&g=5&sid=' . $this->sid); @@ -142,6 +142,6 @@ class phpbb_functional_avatar_acp_test extends phpbb_functional_test_case $form['avatar_gravatar_width']->setValue(80); $form['avatar_gravatar_height']->setValue(80); $crawler = $this->client->submit($form); - $this->assertContains($this->lang('EMAIL_INVALID_EMAIL'), $crawler->text()); + $this->assertContainsLang('EMAIL_INVALID_EMAIL', $crawler->text()); } } |
