mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
[ticket/14948] Adjust calls for twig and phpunit updates
PHPBB3-14948
This commit is contained in:
3
tests/cache/apc_driver_test.php
vendored
3
tests/cache/apc_driver_test.php
vendored
@@ -20,7 +20,6 @@ require_once dirname(__FILE__) . '/common_test_case.php';
|
||||
class phpbb_cache_apc_driver_test extends phpbb_cache_common_test_case
|
||||
{
|
||||
protected static $config;
|
||||
protected $driver;
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
@@ -47,7 +46,7 @@ class phpbb_cache_apc_driver_test extends phpbb_cache_common_test_case
|
||||
}
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
5
tests/cache/apcu_driver_test.php
vendored
5
tests/cache/apcu_driver_test.php
vendored
@@ -20,7 +20,6 @@ require_once dirname(__FILE__) . '/common_test_case.php';
|
||||
class phpbb_cache_apcu_driver_test extends phpbb_cache_common_test_case
|
||||
{
|
||||
protected static $config;
|
||||
protected $driver;
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
@@ -45,9 +44,11 @@ class phpbb_cache_apcu_driver_test extends phpbb_cache_common_test_case
|
||||
{
|
||||
self::markTestSkipped('APCu is not enabled for CLI. Set apc.enable_cli=1 in php.ini');
|
||||
}
|
||||
|
||||
parent::setUpBeforeClass();
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
global $phpbb_container, $phpbb_root_path;
|
||||
|
||||
|
2
tests/cache/cache_memory_test.php
vendored
2
tests/cache/cache_memory_test.php
vendored
@@ -23,7 +23,7 @@ class phpbb_cache_memory_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/cache_memory.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
global $db;
|
||||
parent::setUp();
|
||||
|
3
tests/cache/common_test_case.php
vendored
3
tests/cache/common_test_case.php
vendored
@@ -13,6 +13,9 @@
|
||||
|
||||
abstract class phpbb_cache_common_test_case extends phpbb_database_test_case
|
||||
{
|
||||
/** @var \phpbb\cache\driver\driver_interface */
|
||||
protected $driver;
|
||||
|
||||
public function test_get_put_exists()
|
||||
{
|
||||
$this->assertFalse($this->driver->_exists('test_key'));
|
||||
|
4
tests/cache/dummy_driver_test.php
vendored
4
tests/cache/dummy_driver_test.php
vendored
@@ -13,14 +13,12 @@
|
||||
|
||||
class phpbb_cache_dummy_driver_test extends phpbb_database_test_case
|
||||
{
|
||||
protected $driver;
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
12
tests/cache/file_driver_test.php
vendored
12
tests/cache/file_driver_test.php
vendored
@@ -16,22 +16,18 @@ require_once dirname(__FILE__) . '/common_test_case.php';
|
||||
class phpbb_cache_file_driver_test extends phpbb_cache_common_test_case
|
||||
{
|
||||
private $cache_dir;
|
||||
protected $driver;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->cache_dir = dirname(__FILE__) . '/../tmp/cache/';
|
||||
}
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->cache_dir = dirname(__FILE__) . '/../tmp/cache/';
|
||||
|
||||
if (file_exists($this->cache_dir))
|
||||
{
|
||||
// cache directory possibly left after aborted
|
||||
@@ -43,7 +39,7 @@ class phpbb_cache_file_driver_test extends phpbb_cache_common_test_case
|
||||
$this->driver = new \phpbb\cache\driver\file($this->cache_dir);
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
if (file_exists($this->cache_dir))
|
||||
{
|
||||
|
11
tests/cache/redis_driver_test.php
vendored
11
tests/cache/redis_driver_test.php
vendored
@@ -13,10 +13,9 @@
|
||||
|
||||
require_once dirname(__FILE__) . '/common_test_case.php';
|
||||
|
||||
class phpbb_cache_redis_driver_test extends phpbb_cache_common_test_case
|
||||
class phpbb_cache_redis_driver_test extends \phpbb_cache_common_test_case
|
||||
{
|
||||
protected static $config;
|
||||
protected $driver;
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
@@ -41,12 +40,18 @@ class phpbb_cache_redis_driver_test extends phpbb_cache_common_test_case
|
||||
{
|
||||
self::markTestSkipped('Test redis host/port is not specified');
|
||||
}
|
||||
|
||||
parent::setUpBeforeClass();
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpbb_container;
|
||||
|
||||
parent::setUp();
|
||||
|
||||
$phpbb_container = new phpbb_mock_container_builder();
|
||||
$phpbb_container->setParameter('core.cache_dir', $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/');
|
||||
$this->driver = new \phpbb\cache\driver\redis(self::$config['host'], self::$config['port']);
|
||||
$this->driver->purge();
|
||||
}
|
||||
|
Reference in New Issue
Block a user