1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-10-05 20:21:53 +02:00

[ticket/17543] Use class method to call db object instance where possible

PHPBB-17543
This commit is contained in:
rxu
2025-09-24 23:16:15 +07:00
parent 70c07d4302
commit b51f8bc6e9
13 changed files with 73 additions and 97 deletions

View File

@@ -40,15 +40,14 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
{
global $cache, $config;
$cache = new phpbb_mock_null_cache;
$db = $this->get_db();
$sql = 'UPDATE ' . CONFIG_TABLE . " SET config_value = 'foobar' WHERE config_name = 'auth_method'";
$db->sql_query($sql);
$this->db->sql_query($sql);
$config['auth_method'] = 'foobar';
$this->login('anothertestuser');
$crawler = self::request('GET', 'index.php');
$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);
$this->db->sql_query($sql);
$config['auth_method'] = 'db';
}