mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/9983] Create driver in setup in null driver test.
PHPBB3-9983
This commit is contained in:
parent
1e3dff83b3
commit
829b75e5c8
1 changed files with 10 additions and 3 deletions
13
tests/cache/null_driver_test.php
vendored
13
tests/cache/null_driver_test.php
vendored
|
@ -9,18 +9,25 @@
|
||||||
|
|
||||||
class phpbb_cache_null_driver_test extends phpbb_database_test_case
|
class phpbb_cache_null_driver_test extends phpbb_database_test_case
|
||||||
{
|
{
|
||||||
|
protected $driver;
|
||||||
|
|
||||||
public function getDataSet()
|
public function getDataSet()
|
||||||
{
|
{
|
||||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
|
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
$this->driver = new phpbb_cache_driver_null;
|
||||||
|
}
|
||||||
|
|
||||||
public function test_null_cache_sql()
|
public function test_null_cache_sql()
|
||||||
{
|
{
|
||||||
$driver = new phpbb_cache_driver_null;
|
|
||||||
|
|
||||||
global $db, $cache;
|
global $db, $cache;
|
||||||
$db = $this->new_dbal();
|
$db = $this->new_dbal();
|
||||||
$cache = new phpbb_cache_service($driver);
|
$cache = new phpbb_cache_service($this->driver);
|
||||||
|
|
||||||
$sql = "SELECT * FROM phpbb_config
|
$sql = "SELECT * FROM phpbb_config
|
||||||
WHERE config_name = 'foo'";
|
WHERE config_name = 'foo'";
|
||||||
|
|
Loading…
Add table
Reference in a new issue