mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-02 04:24:56 +02:00
[ticket/14948] Adjust calls for twig and phpunit updates
PHPBB3-14948
This commit is contained in:
parent
8e78d829b1
commit
c6cc6ba8d8
2
phpBB/phpbb/cache/driver/memory.php
vendored
2
phpBB/phpbb/cache/driver/memory.php
vendored
@ -25,7 +25,7 @@ abstract class memory extends \phpbb\cache\driver\base
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
global $phpbb_root_path, $dbname, $table_prefix, $phpbb_container;
|
||||
global $dbname, $table_prefix, $phpbb_container;
|
||||
|
||||
$this->cache_dir = $phpbb_container->getParameter('core.cache_dir');
|
||||
$this->key_prefix = substr(md5($dbname . $table_prefix), 0, 8) . '_';
|
||||
|
@ -41,7 +41,7 @@ class defineparser extends \Twig_TokenParser
|
||||
{
|
||||
// This would happen if someone improperly formed their DEFINE syntax
|
||||
// e.g. <!-- DEFINE $VAR = foo -->
|
||||
throw new \Twig_Error_Syntax('Invalid DEFINE', $token->getLine(), $this->parser->getFilename());
|
||||
throw new \Twig_Error_Syntax('Invalid DEFINE', $token->getLine(), $this->parser->getStream()->getSourceContext()->getPath());
|
||||
}
|
||||
|
||||
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
|
||||
|
@ -8,7 +8,6 @@
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="false"
|
||||
bootstrap="tests/bootstrap.php"
|
||||
>
|
||||
<testsuites>
|
||||
|
@ -27,7 +27,7 @@ class phpbb_acp_board_select_auth_method_test extends phpbb_test_case
|
||||
);
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -21,6 +21,9 @@ class phpbb_attachment_delete_test extends \phpbb_database_test_case
|
||||
/** @var \phpbb\db\driver\driver_interface */
|
||||
protected $db;
|
||||
|
||||
/** @var \phpbb\event\dispatcher_interface */
|
||||
protected $dispatcher;
|
||||
|
||||
/** @var \phpbb\attachment\resync */
|
||||
protected $resync;
|
||||
|
||||
@ -35,13 +38,10 @@ class phpbb_attachment_delete_test extends \phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/resync.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $db, $phpbb_root_path;
|
||||
|
||||
parent::setUp();
|
||||
|
||||
$cache = $this->createMock('\phpbb\cache\driver\driver_interface');
|
||||
$this->config = new \phpbb\config\config(array());
|
||||
$this->db = $this->new_dbal();
|
||||
$this->resync = new \phpbb\attachment\resync($this->db);
|
||||
|
@ -17,7 +17,7 @@ class phpbb_attachment_manager_test extends \phpbb_test_case
|
||||
protected $resync;
|
||||
protected $upload;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->delete = $this->getMockBuilder('\phpbb\attachment\delete')
|
||||
->disableOriginalConstructor()
|
||||
|
@ -24,7 +24,7 @@ class phpbb_attachment_resync_test extends \phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/resync.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -74,7 +74,7 @@ class phpbb_attachment_upload_test extends \phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/resync.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
|
@ -17,7 +17,7 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
|
||||
protected $user;
|
||||
protected $request;
|
||||
|
||||
protected function setup()
|
||||
protected function setup(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -25,7 +25,7 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c
|
||||
protected $state_table;
|
||||
protected $user;
|
||||
|
||||
protected function setup()
|
||||
protected function setup(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@ -73,7 +73,10 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c
|
||||
$token = $cache_token;
|
||||
}
|
||||
|
||||
$this->setExpectedException($exception);
|
||||
if (!empty($exception))
|
||||
{
|
||||
$this->expectException($exception);
|
||||
}
|
||||
|
||||
$stored_token = $this->token_storage->retrieveAccessToken($this->service_name);
|
||||
$this->assertEquals($token, $stored_token);
|
||||
@ -120,7 +123,10 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c
|
||||
$token = $cache_token;
|
||||
}
|
||||
|
||||
$this->setExpectedException($exception);
|
||||
if (!empty($exception))
|
||||
{
|
||||
$this->expectException($exception);
|
||||
}
|
||||
|
||||
$stored_token = $this->token_storage->retrieve_access_token_by_session($this->service_name);
|
||||
$this->assertEquals($token, $stored_token);
|
||||
|
@ -25,7 +25,7 @@ class phpbb_avatar_manager_test extends \phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/users.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
|
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();
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class phpbb_captcha_qa_test extends \phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/../fixtures/empty.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $db, $request, $phpbb_container;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
class phpbb_class_loader_test extends \phpbb_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $phpbb_class_loader;
|
||||
$phpbb_class_loader->unregister();
|
||||
@ -22,7 +22,7 @@ class phpbb_class_loader_test extends \phpbb_test_case
|
||||
$phpbb_class_loader_ext->unregister();
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
global $phpbb_class_loader_ext;
|
||||
$phpbb_class_loader_ext->register();
|
||||
|
@ -34,7 +34,7 @@ class phpbb_compress_test extends phpbb_test_case
|
||||
'dir/2_1.txt',
|
||||
);
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
// Required for compress::add_file
|
||||
global $phpbb_root_path;
|
||||
@ -54,7 +54,7 @@ class phpbb_compress_test extends phpbb_test_case
|
||||
}
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
foreach (array(dirname(__FILE__) . self::EXTRACT_DIR, dirname(__FILE__) . self::ARCHIVE_DIR) as $dir)
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ class phpbb_config_db_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -21,7 +21,7 @@ class phpbb_config_db_text_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config_text.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
9
tests/console/cache/purge_test.php
vendored
9
tests/console/cache/purge_test.php
vendored
@ -25,15 +25,12 @@ class phpbb_console_command_cache_purge_test extends phpbb_test_case
|
||||
protected $db;
|
||||
protected $config;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->cache_dir = dirname(__FILE__) . '/tmp/cache/';
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$this->cache_dir = dirname(__FILE__) . '/tmp/cache/';
|
||||
|
||||
if (file_exists($this->cache_dir))
|
||||
{
|
||||
// cache directory possibly left after aborted
|
||||
|
@ -20,7 +20,7 @@ class phpbb_console_command_config_test extends phpbb_test_case
|
||||
protected $command_name;
|
||||
protected $user;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
|
@ -30,7 +30,7 @@ class phpbb_console_command_cron_list_test extends phpbb_test_case
|
||||
|
||||
protected $command_tester;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
|
@ -32,7 +32,7 @@ class phpbb_console_command_cron_run_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $db, $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
|
@ -32,7 +32,7 @@ class phpbb_console_command_thumbnail_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/thumbnail.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $config, $phpbb_root_path, $phpEx, $phpbb_filesystem;
|
||||
|
||||
@ -75,7 +75,7 @@ class phpbb_console_command_thumbnail_test extends phpbb_database_test_case
|
||||
copy(dirname(__FILE__) . '/fixtures/txt.txt', $this->phpbb_root_path . 'files/test_txt');
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
parent::tearDown();
|
||||
|
||||
|
@ -21,7 +21,7 @@ class phpbb_console_user_activate_test extends phpbb_console_user_base
|
||||
{
|
||||
protected $notifications;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -61,7 +61,10 @@ class phpbb_console_user_add_test extends phpbb_console_user_base
|
||||
$output->writeln(print_r($response, true));
|
||||
return $response;
|
||||
};
|
||||
$helper = $this->getMock('\Symfony\Component\Console\Helper\QuestionHelper', array('ask'));
|
||||
$helper = $this->getMockBuilder('\Symfony\Component\Console\Helper\QuestionHelper')
|
||||
->setMethods(['ask'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$helper->expects($this->any())
|
||||
->method('ask')
|
||||
->will($this->returnCallback($ask));
|
||||
|
@ -30,7 +30,7 @@ abstract class phpbb_console_user_base extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $auth, $db, $cache, $config, $user, $phpbb_dispatcher, $phpbb_container, $phpbb_root_path, $phpEx;
|
||||
|
||||
|
@ -29,7 +29,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
|
||||
private $router;
|
||||
private $routing_helper;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $phpbb_dispatcher, $phpbb_root_path, $phpEx;
|
||||
|
||||
|
@ -21,7 +21,7 @@ use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||
|
||||
class phpbb_controller_controller_test extends phpbb_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->extension_manager = new phpbb_mock_extension_manager(
|
||||
dirname(__FILE__) . '/',
|
||||
@ -128,7 +128,8 @@ class phpbb_controller_controller_test extends phpbb_test_case
|
||||
|
||||
if (!empty($exception))
|
||||
{
|
||||
$this->setExpectedException($exception, $exception_message);
|
||||
$this->expectException($exception);
|
||||
$this->expectExceptionMessage($exception_message);
|
||||
}
|
||||
|
||||
$this->assertEquals($expected, $resolver->getArguments($symfony_request, $input));
|
||||
|
@ -20,7 +20,7 @@ require_once dirname(__FILE__) . '/tasks/simple_should_not_run.php';
|
||||
|
||||
class phpbb_cron_manager_test extends \phpbb_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->manager = $this->create_cron_manager(array(
|
||||
new phpbb_cron_task_core_dummy_task(),
|
||||
|
@ -23,7 +23,7 @@ class phpbb_dbal_auto_increment_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@ -42,7 +42,7 @@ class phpbb_dbal_auto_increment_test extends phpbb_database_test_case
|
||||
$this->table_exists = true;
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
if ($this->table_exists)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@ -77,7 +77,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
|
||||
$this->table_exists = true;
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
if ($this->table_exists)
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/migrator.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
class phpbb_dbal_migrator_tool_config_test extends phpbb_test_case
|
||||
{
|
||||
public function setup()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->config = new \phpbb\config\config(array());
|
||||
|
||||
|
@ -18,7 +18,7 @@ class phpbb_dbal_migrator_tool_config_text_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/migrator_config_text.xml');
|
||||
}
|
||||
|
||||
public function setup()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setup();
|
||||
|
||||
|
@ -21,7 +21,7 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/migrator_module.xml');
|
||||
}
|
||||
|
||||
public function setup()
|
||||
public function setUp(): void
|
||||
{
|
||||
// Need global $db, $user for delete_module function in acp_modules
|
||||
global $phpbb_root_path, $phpEx, $skip_add_log, $db, $user, $phpbb_log;
|
||||
|
@ -24,7 +24,7 @@ class phpbb_dbal_migrator_tool_permission_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/migrator_permission.xml');
|
||||
}
|
||||
|
||||
public function setup()
|
||||
public function setUp(): void
|
||||
{
|
||||
// Global $db and $cache are needed in acp/auth.php constructor
|
||||
global $phpbb_root_path, $phpEx, $db, $cache;
|
||||
|
@ -16,7 +16,7 @@ class phpbb_dbal_sql_affected_rows_test extends phpbb_database_test_case
|
||||
/** @var \phpbb\db\driver\driver_interface */
|
||||
protected $db;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->db = $this->new_dbal();
|
||||
|
@ -16,7 +16,7 @@ class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
|
||||
protected $db;
|
||||
protected $buffer;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace
|
||||
protected $phpbb_root_path;
|
||||
protected $filename;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->phpbb_root_path = dirname(__FILE__) . '/';
|
||||
$this->config_php = new \phpbb\config_php_file($this->phpbb_root_path . 'fixtures/', 'php');
|
||||
|
@ -18,7 +18,7 @@ class phpbb_ordered_service_collection_test extends \phpbb_test_case
|
||||
*/
|
||||
protected $service_collection;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$container = new phpbb_mock_container_builder();
|
||||
$container->set('foo', new StdClass);
|
||||
|
@ -18,7 +18,7 @@ class phpbb_service_collection_test extends \phpbb_test_case
|
||||
*/
|
||||
protected $service_collection;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$container = new phpbb_mock_container_builder();
|
||||
$container->set('foo', new StdClass);
|
||||
@ -56,14 +56,16 @@ class phpbb_service_collection_test extends \phpbb_test_case
|
||||
|
||||
public function test_get_by_class_many_services_exception()
|
||||
{
|
||||
$this->setExpectedException('RuntimeException', 'More than one service definitions found for class "bar_class" in collection.');
|
||||
$this->expectException('RuntimeException');
|
||||
$this->expectExceptionMessage('More than one service definitions found for class "bar_class" in collection.');
|
||||
|
||||
$this->service_collection->get_by_class('bar_class');
|
||||
}
|
||||
|
||||
public function test_get_by_class_no_service_exception()
|
||||
{
|
||||
$this->setExpectedException('RuntimeException', 'No service found for class "baz_class" in collection.');
|
||||
$this->expectException('RuntimeException');
|
||||
$this->expectExceptionMessage('No service found for class "baz_class" in collection.');
|
||||
|
||||
$this->service_collection->get_by_class('baz_class');
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class phpbb_email_parsing_test extends phpbb_test_case
|
||||
/** @var \ReflectionProperty */
|
||||
protected $reflection_template_property;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $phpbb_container, $config, $phpbb_root_path, $phpEx, $request, $user;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
class phpbb_error_collector_test extends phpbb_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -16,7 +16,7 @@ class phpbb_event_export_php_test extends phpbb_test_case
|
||||
/** @var \phpbb\event\php_exporter */
|
||||
protected $exporter;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -16,7 +16,7 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
|
||||
/** @var \phpbb\event\php_exporter */
|
||||
protected $exporter;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->exporter = new \phpbb\event\php_exporter(dirname(__FILE__) . '/fixtures/');
|
||||
|
@ -30,7 +30,7 @@ class phpbb_extension_extension_base_test extends phpbb_test_case
|
||||
self::$reflection_method_get_migration_file_list->setAccessible(true);
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$container = new phpbb_mock_container_builder();
|
||||
$migrator = new phpbb_mock_migrator();
|
||||
|
@ -18,7 +18,7 @@ class phpbb_extension_finder_test extends phpbb_test_case
|
||||
/** @var \phpbb\finder */
|
||||
protected $finder;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->extension_manager = new phpbb_mock_extension_manager(
|
||||
dirname(__FILE__) . '/',
|
||||
|
@ -26,7 +26,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/extensions.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -32,7 +32,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/extensions.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -24,7 +24,7 @@ class phpbb_extension_modules_test extends phpbb_test_case
|
||||
protected $finder;
|
||||
protected $module_manager;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $phpbb_extension_manager;
|
||||
|
||||
|
@ -25,7 +25,7 @@ class phpbb_feed_attachments_base_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/../extension/fixtures/extensions.xml');
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
@ -98,7 +98,7 @@ class phpbb_feed_attachments_base_test extends phpbb_database_test_case
|
||||
|
||||
if ($expected_exception !== false)
|
||||
{
|
||||
$this->setExpectedException($expected_exception);
|
||||
$this->expectException($expected_exception);
|
||||
|
||||
$this->attachments_mocks_feed->get_sql();
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class phpbb_files_types_base_test extends phpbb_test_case
|
||||
/** @var string phpBB root path */
|
||||
protected $phpbb_root_path;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
|
@ -38,7 +38,7 @@ class phpbb_files_types_form_test extends phpbb_test_case
|
||||
/** @var string phpBB root path */
|
||||
protected $phpbb_root_path;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
|
@ -38,7 +38,7 @@ class phpbb_files_types_local_test extends phpbb_test_case
|
||||
/** @var string phpBB root path */
|
||||
protected $phpbb_root_path;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
|
@ -45,7 +45,7 @@ class phpbb_files_types_remote_test extends phpbb_test_case
|
||||
/** @var string phpBB root path */
|
||||
protected $phpbb_root_path;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
|
@ -35,7 +35,7 @@ class phpbb_files_upload_test extends phpbb_test_case
|
||||
/** @var string phpBB root path */
|
||||
protected $phpbb_root_path;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
// Global $config required by unique_id
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
|
@ -15,7 +15,7 @@ class phpbb_filesystem_clean_path_test extends phpbb_test_case
|
||||
{
|
||||
protected $filesystem;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->filesystem = new \phpbb\filesystem\filesystem();
|
||||
|
@ -16,7 +16,7 @@ use phpbb\filesystem\helper as filesystem_helper;
|
||||
class phpbb_filesystem_helper_clean_path_test extends phpbb_test_case
|
||||
{
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ use phpbb\filesystem\helper as filesystem_helper;
|
||||
class phpbb_filesystem_helper_is_absolute_test extends phpbb_test_case
|
||||
{
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class phpbb_filesystem_helper_realpath_test extends phpbb_test_case
|
||||
self::$filesystem_helper_phpbb_own_realpath->setAccessible(true);
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ class phpbb_filesystem_is_absolute_test extends phpbb_test_case
|
||||
/** @var \phpbb\filesystem\filesystem_interface */
|
||||
protected $filesystem;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -27,7 +27,7 @@ class phpbb_filesystem_realpath_test extends phpbb_test_case
|
||||
self::$filesystem_own_realpath->setAccessible(true);
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
class phpbb_functional_acp_profile_field_test extends phpbb_functional_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
class phpbb_functional_acp_users_test extends phpbb_functional_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -21,7 +21,7 @@ abstract class phpbb_functional_common_avatar_test_case extends phpbb_functional
|
||||
|
||||
abstract function get_url();
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->path = __DIR__ . '/fixtures/files/';
|
||||
|
@ -37,7 +37,7 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
|
||||
self::$helper->restore_original_ext_dir();
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -45,7 +45,7 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
|
||||
self::$helper->restore_original_ext_dir();
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -41,10 +41,10 @@ class phpbb_functional_extension_global_lang_test extends phpbb_functional_test_
|
||||
self::$helper->restore_original_ext_dir();
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
$this->get_db();
|
||||
|
||||
$this->phpbb_extension_manager = $this->get_extension_manager();
|
||||
@ -52,7 +52,7 @@ class phpbb_functional_extension_global_lang_test extends phpbb_functional_test_
|
||||
$this->purge_cache();
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
parent::tearDown();
|
||||
|
||||
|
@ -40,7 +40,7 @@ class phpbb_functional_extension_module_test extends phpbb_functional_test_case
|
||||
self::$helper->restore_original_ext_dir();
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
@ -41,12 +41,12 @@ class phpbb_functional_extension_permission_lang_test extends phpbb_functional_t
|
||||
self::$helper->restore_original_ext_dir();
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
$this->get_db();
|
||||
|
||||
|
||||
$acl_ary = array(
|
||||
'auth_option' => 'u_foo',
|
||||
'is_global' => 1,
|
||||
|
@ -20,7 +20,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
|
||||
|
||||
static public $init_values = array();
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->purge_cache();
|
||||
|
@ -18,14 +18,14 @@ class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case
|
||||
{
|
||||
private $path;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->path = __DIR__ . '/fixtures/files/';
|
||||
$this->add_lang('posting');
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
$iterator = new DirectoryIterator(__DIR__ . '/../../phpBB/files/');
|
||||
foreach ($iterator as $fileinfo)
|
||||
|
@ -37,7 +37,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
|
||||
/** @var string phpBB root path */
|
||||
protected $phpbb_root_path;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
// Only doing this within the functional framework because we need a
|
||||
@ -69,7 +69,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
global $config, $user;
|
||||
$user = null;
|
||||
|
@ -45,7 +45,7 @@ class phpbb_functional_forgot_password_test extends phpbb_functional_test_case
|
||||
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
$this->login();
|
||||
$this->admin_login();
|
||||
|
@ -24,7 +24,7 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case
|
||||
'foo/bar/',
|
||||
);
|
||||
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
$this->purge_cache();
|
||||
|
||||
@ -46,7 +46,7 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case
|
||||
self::$helper->restore_original_ext_dir();
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -30,7 +30,7 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case
|
||||
$db->sql_query($query);
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->purge_cache();
|
||||
@ -40,7 +40,7 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case
|
||||
$this->login();
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
public function tearDown(): void
|
||||
{
|
||||
$this->set_extension_group_permission(0);
|
||||
$iterator = new DirectoryIterator(__DIR__ . '/../../phpBB/files/');
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
class phpbb_functional_ucp_pm_test extends phpbb_functional_test_case
|
||||
{
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->login();
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
class phpbb_build_url_test extends phpbb_test_case
|
||||
{
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
global $user, $phpbb_dispatcher, $phpbb_container, $phpbb_root_path, $phpbb_path_helper;
|
||||
|
||||
|
@ -15,7 +15,7 @@ class phpbb_generate_string_list_test extends phpbb_test_case
|
||||
{
|
||||
public $user;
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
class phpbb_functions_make_clickable_email_test extends phpbb_test_case
|
||||
{
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -154,7 +154,7 @@ class phpbb_functions_make_clickable_test extends phpbb_test_case
|
||||
);
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -18,7 +18,7 @@ class phpbb_functions_obtain_online_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/obtain_online.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -43,13 +43,13 @@ class phpbb_get_banned_user_ids_test extends phpbb_database_test_case
|
||||
);
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
global $db;
|
||||
|
||||
$db = $this->new_dbal();
|
||||
|
||||
return parent::setUp();
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ class phpbb_functions_user_delete_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/user_delete.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -18,7 +18,7 @@ class phpbb_functions_validate_date_test extends phpbb_test_case
|
||||
{
|
||||
protected $helper;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -22,7 +22,7 @@ class phpbb_functions_validate_email_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/validate_email.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -18,7 +18,7 @@ class phpbb_functions_validate_jabber_test extends phpbb_test_case
|
||||
{
|
||||
protected $helper;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@ -32,7 +32,7 @@ class phpbb_functions_validate_jabber_test extends phpbb_test_case
|
||||
array(),
|
||||
'',
|
||||
array('jabber'),
|
||||
),
|
||||
),
|
||||
'no_seperator' => array(
|
||||
array('WRONG_DATA'),
|
||||
'testjabber.ccc',
|
||||
|
@ -24,7 +24,7 @@ class phpbb_functions_validate_lang_iso_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/language_select.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -18,7 +18,7 @@ class phpbb_functions_validate_match_test extends phpbb_test_case
|
||||
{
|
||||
protected $helper;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -18,7 +18,7 @@ class phpbb_functions_validate_num_test extends phpbb_test_case
|
||||
{
|
||||
protected $helper;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -18,7 +18,7 @@ class phpbb_functions_validate_password_test extends phpbb_test_case
|
||||
{
|
||||
protected $helper;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -18,7 +18,7 @@ class phpbb_functions_validate_string_test extends phpbb_test_case
|
||||
{
|
||||
protected $helper;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -26,7 +26,7 @@ class phpbb_functions_validate_user_email_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/validate_email.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -26,7 +26,7 @@ class phpbb_functions_validate_data_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/validate_username.xml');
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user