1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-14 04:34:07 +02:00

[ticket/16549] Move from assert[Not]Contains to assertString[Not]ContainsString

PHPBB3-16549
This commit is contained in:
rxu
2020-07-13 13:45:12 +07:00
parent 16d8698e1b
commit 58ea656fd8
49 changed files with 291 additions and 280 deletions

View File

@@ -49,7 +49,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
$post = $this->create_topic($this->data['forums']['Download #1'], 'Download Topic #1', 'This is a test topic posted by the testing framework.', array('upload_files' => 1));
$crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
$this->assertContains('Download Topic #1', $crawler->filter('html')->text());
$this->assertStringContainsString('Download Topic #1', $crawler->filter('html')->text());
$this->data['topics']['Download Topic #1'] = (int) $post['topic_id'];
$this->data['posts']['Download Topic #1'] = (int) $this->get_parameter_from_link($crawler->filter('.post')->selectLink($this->lang('POST', '', ''))->link()->getUri(), 'p');
@@ -57,7 +57,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
$post2 = $this->create_post($this->data['forums']['Download #1'], $post['topic_id'], 'Re: Download Topic #1-#2', 'This is a test post posted by the testing framework.', array('upload_files' => 1));
$crawler = self::request('GET', "viewtopic.php?p={$post2['post_id']}&sid={$this->sid}");
$this->assertContains('Re: Download Topic #1-#2', $crawler->filter('html')->text());
$this->assertStringContainsString('Re: Download Topic #1-#2', $crawler->filter('html')->text());
$this->data['posts']['Re: Download Topic #1-#2'] = (int) $post2['post_id'];
}
@@ -115,7 +115,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
$this->assertContainsLang('POST_DELETED', $crawler->text());
$crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Download Topic #1']}&sid={$this->sid}");
$this->assertContains($this->lang('POST_DISPLAY', '', ''), $crawler->text());
$this->assertStringContainsString($this->lang('POST_DISPLAY', '', ''), $crawler->text());
}
public function test_download_softdeleted_post()
@@ -182,7 +182,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
$this->assertContainsLang('TOPIC_DELETED_SUCCESS', $crawler->text());
$crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Download Topic #1']}&sid={$this->sid}");
$this->assertContains('Download Topic #1', $crawler->filter('h2')->text());
$this->assertStringContainsString('Download Topic #1', $crawler->filter('h2')->text());
}
public function test_download_softdeleted_topic()