mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-14 04:30:29 +01:00
[ticket/11700] Fix config namespace mishap in cache tests
PHPBB3-11700
This commit is contained in:
parent
76dfe153fc
commit
e10c3d8c08
10
tests/cache/common_test_case.php
vendored
10
tests/cache/common_test_case.php
vendored
@ -65,11 +65,11 @@ abstract class phpbb_cache_common_test_case extends phpbb_database_test_case
|
||||
public function test_cache_sql()
|
||||
{
|
||||
global $db, $cache, $phpbb_root_path, $phpEx;
|
||||
$config = new \phpbb\config\config(array());
|
||||
$config = new phpbb\config\config(array());
|
||||
$db = $this->new_dbal();
|
||||
$cache = new \phpbb\cache\service($this->driver, $config, $db, $phpbb_root_path, $phpEx);
|
||||
|
||||
$sql = "SELECT * FROM \phpbb\config\config
|
||||
$sql = "SELECT * FROM phpbb_config
|
||||
WHERE config_name = 'foo'";
|
||||
|
||||
$result = $db->sql_query($sql, 300);
|
||||
@ -77,16 +77,16 @@ abstract class phpbb_cache_common_test_case extends phpbb_database_test_case
|
||||
$expected = array('config_name' => 'foo', 'config_value' => '23', 'is_dynamic' => 0);
|
||||
$this->assertEquals($expected, $first_result);
|
||||
|
||||
$sql = 'DELETE FROM \phpbb\config\config';
|
||||
$sql = 'DELETE FROM phpbb_config';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$sql = "SELECT * FROM \phpbb\config\config
|
||||
$sql = "SELECT * FROM phpbb_config
|
||||
WHERE config_name = 'foo'";
|
||||
$result = $db->sql_query($sql, 300);
|
||||
|
||||
$this->assertEquals($expected, $db->sql_fetchrow($result));
|
||||
|
||||
$sql = "SELECT * FROM \phpbb\config\config
|
||||
$sql = "SELECT * FROM phpbb_config
|
||||
WHERE config_name = 'foo'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
8
tests/cache/null_driver_test.php
vendored
8
tests/cache/null_driver_test.php
vendored
@ -48,23 +48,23 @@ class phpbb_cache_null_driver_test extends phpbb_database_test_case
|
||||
public function test_cache_sql()
|
||||
{
|
||||
global $db, $cache, $phpbb_root_path, $phpEx;
|
||||
$config = new \phpbb\config\config(array());
|
||||
$config = new phpbb\config\config(array());
|
||||
$db = $this->new_dbal();
|
||||
$cache = new \phpbb\cache\service($this->driver, $config, $db, $phpbb_root_path, $phpEx);
|
||||
|
||||
$sql = "SELECT * FROM \phpbb\config\config
|
||||
$sql = "SELECT * FROM phpbb_config
|
||||
WHERE config_name = 'foo'";
|
||||
$result = $db->sql_query($sql, 300);
|
||||
$first_result = $db->sql_fetchrow($result);
|
||||
$expected = array('config_name' => 'foo', 'config_value' => '23', 'is_dynamic' => 0);
|
||||
$this->assertEquals($expected, $first_result);
|
||||
|
||||
$sql = 'DELETE FROM \phpbb\config\config';
|
||||
$sql = 'DELETE FROM phpbb_config';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
// As null cache driver does not actually cache,
|
||||
// this should return no results
|
||||
$sql = "SELECT * FROM \phpbb\config\config
|
||||
$sql = "SELECT * FROM phpbb_config
|
||||
WHERE config_name = 'foo'";
|
||||
$result = $db->sql_query($sql, 300);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user