1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +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

@@ -22,7 +22,7 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
// check for logout link
$crawler = self::request('GET', 'index.php');
$this->assertContains($this->lang('LOGOUT', 'admin'), $crawler->filter('.navbar')->text());
$this->assertStringContainsString($this->lang('LOGOUT', 'admin'), $crawler->filter('.navbar')->text());
}
public function test_login_other()
@@ -30,7 +30,7 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
$this->create_user('anothertestuser');
$this->login('anothertestuser');
$crawler = self::request('GET', 'index.php');
$this->assertContains('anothertestuser', $crawler->filter('#username_logged_in')->text());
$this->assertStringContainsString('anothertestuser', $crawler->filter('#username_logged_in')->text());
}
/**
@@ -46,7 +46,7 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
$config['auth_method'] = 'foobar';
$this->login('anothertestuser');
$crawler = self::request('GET', 'index.php');
$this->assertContains('anothertestuser', $crawler->filter('#username_logged_in')->text());
$this->assertStringContainsString('anothertestuser', $crawler->filter('#username_logged_in')->text());
$sql = 'UPDATE ' . CONFIG_TABLE . " SET config_value = 'db' WHERE config_name = 'auth_method'";
$db->sql_query($sql);
$config['auth_method'] = 'db';
@@ -65,7 +65,7 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
// look for a register link, which should be visible only when logged out
$crawler = self::request('GET', 'index.php');
$this->assertContains($this->lang('REGISTER'), $crawler->filter('.navbar')->text());
$this->assertStringContainsString($this->lang('REGISTER'), $crawler->filter('.navbar')->text());
}
public function test_acp_login()
@@ -75,6 +75,6 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
// check that we are logged in
$crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid);
$this->assertContains($this->lang('ADMIN_PANEL'), $crawler->filter('h1')->text());
$this->assertStringContainsString($this->lang('ADMIN_PANEL'), $crawler->filter('h1')->text());
}
}