1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-10-05 12:13:23 +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

@@ -30,9 +30,8 @@ class phpbb_functional_forum_style_test extends phpbb_functional_test_case
public function test_custom_forum_style()
{
$db = $this->get_db();
$this->add_style(2, 'test_style');
$db->sql_query('UPDATE ' . FORUMS_TABLE . ' SET forum_style = 2 WHERE forum_id = 2');
$this->db->sql_query('UPDATE ' . FORUMS_TABLE . ' SET forum_style = 2 WHERE forum_id = 2');
$crawler = self::request('GET', 'viewtopic.php?t=1&f=2');
$this->assertStringContainsString('styles/test_style/', $crawler->filter('head > link[rel=stylesheet]')->eq(1)->attr('href'));
@@ -43,7 +42,7 @@ class phpbb_functional_forum_style_test extends phpbb_functional_test_case
$crawler = self::request('GET', 'viewtopic.php?t=1&view=next');
$this->assertStringContainsString('styles/test_style/', $crawler->filter('head > link[rel=stylesheet]')->eq(1)->attr('href'));
$db->sql_query('UPDATE ' . FORUMS_TABLE . ' SET forum_style = 0 WHERE forum_id = 2');
$this->db->sql_query('UPDATE ' . FORUMS_TABLE . ' SET forum_style = 0 WHERE forum_id = 2');
$this->delete_style(2, 'test_style');
}
}