-
phpBB 3.2.x takes advantage of new features added in PHP 5.5.9. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 5.5.9 and the maximum supported version is the latest stable version of PHP.
+
phpBB 3.2.x takes advantage of new features added in PHP 7.1.0. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 7.1.0 and the maximum supported version is the latest stable version of PHP.
Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.
-
This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 5.4.7 above 5.6.x to 7.1.x and 7.2.x without problem.
+
This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 7.1.0 to 7.2.x and 7.3.x without issues.
7.i. Notice on PHP security issues
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php
index e86da77b38..56d64d37fb 100644
--- a/phpBB/includes/functions_compress.php
+++ b/phpBB/includes/functions_compress.php
@@ -305,8 +305,8 @@ class compress_zip extends compress
}
}
}
- // This is a directory, we are not writting files
- continue;
+ // This is a directory, we are not writing files
+ continue 2;
}
else
{
diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php
index 66f85657a5..d42ae58c42 100644
--- a/phpBB/includes/startup.php
+++ b/phpBB/includes/startup.php
@@ -23,11 +23,11 @@ $level = E_ALL & ~E_NOTICE & ~E_DEPRECATED;
error_reporting($level);
/**
-* Minimum Requirement: PHP 5.4.0
+* Minimum Requirement: PHP 7.1.0
*/
-if (version_compare(PHP_VERSION, '5.4') < 0)
+if (version_compare(PHP_VERSION, '7.1') < 0)
{
- die('You are running an unsupported PHP version. Please upgrade to PHP 5.4.0 or higher before trying to install or update to phpBB 3.2');
+ die('You are running an unsupported PHP version. Please upgrade to PHP 7.1.0 or higher before trying to install or update to phpBB 3.3');
}
// Register globals and magic quotes have been dropped in PHP 5.4 so no need for extra checks
diff --git a/phpBB/install/app.php b/phpBB/install/app.php
index ef59689a65..9d04ec2156 100644
--- a/phpBB/install/app.php
+++ b/phpBB/install/app.php
@@ -20,9 +20,9 @@ define('PHPBB_ENVIRONMENT', 'production');
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
-if (version_compare(PHP_VERSION, '5.4') < 0)
+if (version_compare(PHP_VERSION, '7.1') < 0)
{
- die('You are running an unsupported PHP version. Please upgrade to PHP 5.4.0 or higher before trying to install or update to phpBB 3.2');
+ die('You are running an unsupported PHP version. Please upgrade to PHP 7.1.0 or higher before trying to install or update to phpBB 3.3');
}
$startup_new_path = $phpbb_root_path . 'install/update/update/new/install/startup.' . $phpEx;
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 3faec8a499..9ebb576da0 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -105,7 +105,7 @@ $lang = array_merge($lang, array(
// Server requirements
'PHP_VERSION_REQD' => 'PHP version',
- 'PHP_VERSION_REQD_EXPLAIN' => 'phpBB requires PHP version 5.4.0 or higher.',
+ 'PHP_VERSION_REQD_EXPLAIN' => 'phpBB requires PHP version 7.1.0 or higher.',
'PHP_GETIMAGESIZE_SUPPORT' => 'PHP getimagesize() function is required',
'PHP_GETIMAGESIZE_SUPPORT_EXPLAIN' => 'In order for phpBB to function correctly, the getimagesize function needs to be available.',
'PCRE_UTF_SUPPORT' => 'PCRE UTF-8 support',
diff --git a/phpBB/phpbb/cache/driver/memory.php b/phpBB/phpbb/cache/driver/memory.php
index eba9549877..956936bf6f 100644
--- a/phpBB/phpbb/cache/driver/memory.php
+++ b/phpBB/phpbb/cache/driver/memory.php
@@ -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) . '_';
diff --git a/phpBB/phpbb/install/module/requirements/task/check_server_environment.php b/phpBB/phpbb/install/module/requirements/task/check_server_environment.php
index 29f9777747..4607ce9ec2 100644
--- a/phpBB/phpbb/install/module/requirements/task/check_server_environment.php
+++ b/phpBB/phpbb/install/module/requirements/task/check_server_environment.php
@@ -98,7 +98,7 @@ class check_server_environment extends \phpbb\install\task_base
{
$php_version = PHP_VERSION;
- if (version_compare($php_version, '5.4') < 0)
+ if (version_compare($php_version, '7.1') < 0)
{
$this->response_helper->add_error_message('PHP_VERSION_REQD', 'PHP_VERSION_REQD_EXPLAIN');
diff --git a/phpBB/phpbb/template/asset.php b/phpBB/phpbb/template/asset.php
index fb70fbb24e..5fc3e4acaf 100644
--- a/phpBB/phpbb/template/asset.php
+++ b/phpBB/phpbb/template/asset.php
@@ -42,13 +42,6 @@ class asset
*/
public function set_url($url)
{
- if (version_compare(PHP_VERSION, '5.4.7') < 0 && substr($url, 0, 2) === '//')
- {
- // Workaround for PHP 5.4.6 and older bug #62844 - add fake scheme and then remove it
- $this->components = parse_url('http:' . $url);
- $this->components['scheme'] = '';
- return;
- }
$this->components = parse_url($url);
}
diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php
index d0bcfa615e..6615a46067 100644
--- a/phpBB/phpbb/template/twig/lexer.php
+++ b/phpBB/phpbb/template/twig/lexer.php
@@ -15,20 +15,10 @@ namespace phpbb\template\twig;
class lexer extends \Twig_Lexer
{
- public function set_environment(\Twig_Environment $env)
+ public function tokenize(\Twig_Source $source)
{
- $this->env = $env;
- }
-
- public function tokenize($code, $filename = null)
- {
- // Handle \Twig_Source format input
- if ($code instanceof \Twig_Source)
- {
- $source = $code;
- $code = $source->getCode();
- $filename = $source->getName();
- }
+ $code = $source->getCode();
+ $filename = $source->getName();
// Our phpBB tags
// Commented out tokens are handled separately from the main replace
diff --git a/phpBB/phpbb/template/twig/tokenparser/defineparser.php b/phpBB/phpbb/template/twig/tokenparser/defineparser.php
index 2137b145b7..6285091e94 100644
--- a/phpBB/phpbb/template/twig/tokenparser/defineparser.php
+++ b/phpBB/phpbb/template/twig/tokenparser/defineparser.php
@@ -41,7 +41,7 @@ class defineparser extends \Twig_TokenParser
{
// This would happen if someone improperly formed their DEFINE syntax
// e.g.
- 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);
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 71a94da89f..e5b074cf16 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="false"
bootstrap="tests/bootstrap.php"
>
@@ -25,8 +24,7 @@
./tests/lint_test.php
- ./tests/ui
+ ./tests/ui
diff --git a/tests/acp_board/select_auth_method_test.php b/tests/acp_board/select_auth_method_test.php
index 16e5954c64..3cb8ea7cd6 100644
--- a/tests/acp_board/select_auth_method_test.php
+++ b/tests/acp_board/select_auth_method_test.php
@@ -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();
diff --git a/tests/attachment/delete_test.php b/tests/attachment/delete_test.php
index 67adc50edf..26f6d11bfc 100644
--- a/tests/attachment/delete_test.php
+++ b/tests/attachment/delete_test.php
@@ -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);
diff --git a/tests/attachment/manager_test.php b/tests/attachment/manager_test.php
index 47d7f38b1d..c440dcf101 100644
--- a/tests/attachment/manager_test.php
+++ b/tests/attachment/manager_test.php
@@ -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()
diff --git a/tests/attachment/resync_test.php b/tests/attachment/resync_test.php
index f882af9ae5..de5ead5bff 100644
--- a/tests/attachment/resync_test.php
+++ b/tests/attachment/resync_test.php
@@ -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();
diff --git a/tests/attachment/upload_test.php b/tests/attachment/upload_test.php
index 2a0bf0fa40..eb7067b263 100644
--- a/tests/attachment/upload_test.php
+++ b/tests/attachment/upload_test.php
@@ -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;
diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php
index f30d19ef9d..0c26a0a186 100644
--- a/tests/auth/provider_apache_test.php
+++ b/tests/auth/provider_apache_test.php
@@ -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();
diff --git a/tests/auth/provider_oauth_token_storage_test.php b/tests/auth/provider_oauth_token_storage_test.php
index ae5de6aa7e..0c0e55dec6 100644
--- a/tests/auth/provider_oauth_token_storage_test.php
+++ b/tests/auth/provider_oauth_token_storage_test.php
@@ -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);
diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php
index e22d76a988..db4ebfa0da 100644
--- a/tests/avatar/manager_test.php
+++ b/tests/avatar/manager_test.php
@@ -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;
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 18977bac88..62f91e346e 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -42,7 +42,7 @@ require_once 'test_framework/phpbb_database_test_connection_manager.php';
require_once 'test_framework/phpbb_functional_test_case.php';
require_once 'test_framework/phpbb_ui_test_case.php';
-if (version_compare(PHP_VERSION, '5.3.19', ">=") && file_exists(__DIR__ . '/vendor/autoload.php'))
+if (file_exists(__DIR__ . '/vendor/autoload.php'))
{
require_once __DIR__ . '/vendor/autoload.php';
}
diff --git a/tests/cache/apc_driver_test.php b/tests/cache/apc_driver_test.php
index 706f274448..276cbeb3e1 100644
--- a/tests/cache/apc_driver_test.php
+++ b/tests/cache/apc_driver_test.php
@@ -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();
diff --git a/tests/cache/apcu_driver_test.php b/tests/cache/apcu_driver_test.php
index 57f640c313..34bcf8f844 100644
--- a/tests/cache/apcu_driver_test.php
+++ b/tests/cache/apcu_driver_test.php
@@ -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;
diff --git a/tests/cache/cache_memory_test.php b/tests/cache/cache_memory_test.php
index ba1010bcf3..b3d19f1782 100644
--- a/tests/cache/cache_memory_test.php
+++ b/tests/cache/cache_memory_test.php
@@ -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();
diff --git a/tests/cache/common_test_case.php b/tests/cache/common_test_case.php
index ee0649a755..64273c250a 100644
--- a/tests/cache/common_test_case.php
+++ b/tests/cache/common_test_case.php
@@ -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'));
diff --git a/tests/cache/dummy_driver_test.php b/tests/cache/dummy_driver_test.php
index 6cb6b73729..6802e120ab 100644
--- a/tests/cache/dummy_driver_test.php
+++ b/tests/cache/dummy_driver_test.php
@@ -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();
diff --git a/tests/cache/file_driver_test.php b/tests/cache/file_driver_test.php
index 471316847d..37973edba3 100644
--- a/tests/cache/file_driver_test.php
+++ b/tests/cache/file_driver_test.php
@@ -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))
{
diff --git a/tests/cache/redis_driver_test.php b/tests/cache/redis_driver_test.php
index 387e6ca855..a2288cf9a8 100644
--- a/tests/cache/redis_driver_test.php
+++ b/tests/cache/redis_driver_test.php
@@ -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();
}
diff --git a/tests/captcha/qa_test.php b/tests/captcha/qa_test.php
index 7ec4be69f5..0856bbd3c3 100644
--- a/tests/captcha/qa_test.php
+++ b/tests/captcha/qa_test.php
@@ -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;
diff --git a/tests/class_loader/class_loader_test.php b/tests/class_loader/class_loader_test.php
index ffb14b0720..60d8d26b13 100644
--- a/tests/class_loader/class_loader_test.php
+++ b/tests/class_loader/class_loader_test.php
@@ -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();
diff --git a/tests/compress/compress_test.php b/tests/compress/compress_test.php
index c071a049a8..f67726c205 100644
--- a/tests/compress/compress_test.php
+++ b/tests/compress/compress_test.php
@@ -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)
{
diff --git a/tests/config/db_test.php b/tests/config/db_test.php
index 713e6cb6d9..46addc9d38 100644
--- a/tests/config/db_test.php
+++ b/tests/config/db_test.php
@@ -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();
diff --git a/tests/config/db_text_test.php b/tests/config/db_text_test.php
index a91abf990f..0683abc1a9 100644
--- a/tests/config/db_text_test.php
+++ b/tests/config/db_text_test.php
@@ -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();
diff --git a/tests/console/cache/purge_test.php b/tests/console/cache/purge_test.php
index 7a7e1dee5c..2bb4252c41 100644
--- a/tests/console/cache/purge_test.php
+++ b/tests/console/cache/purge_test.php
@@ -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
diff --git a/tests/console/config/config_test.php b/tests/console/config/config_test.php
index 7f8b2efce2..65bfad4757 100644
--- a/tests/console/config/config_test.php
+++ b/tests/console/config/config_test.php
@@ -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;
diff --git a/tests/console/cron/cron_list_test.php b/tests/console/cron/cron_list_test.php
index 931713cd3c..69ae53c128 100644
--- a/tests/console/cron/cron_list_test.php
+++ b/tests/console/cron/cron_list_test.php
@@ -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;
diff --git a/tests/console/cron/run_test.php b/tests/console/cron/run_test.php
index 81e4e69f39..fce913dde4 100644
--- a/tests/console/cron/run_test.php
+++ b/tests/console/cron/run_test.php
@@ -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;
diff --git a/tests/console/thumbnail_test.php b/tests/console/thumbnail_test.php
index dc2bf47899..b8a85c4f4f 100644
--- a/tests/console/thumbnail_test.php
+++ b/tests/console/thumbnail_test.php
@@ -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();
diff --git a/tests/console/user/activate_test.php b/tests/console/user/activate_test.php
index 1588a76e47..51e9754b59 100644
--- a/tests/console/user/activate_test.php
+++ b/tests/console/user/activate_test.php
@@ -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();
diff --git a/tests/console/user/add_test.php b/tests/console/user/add_test.php
index bdfb8a8d2a..cc86cb27d3 100644
--- a/tests/console/user/add_test.php
+++ b/tests/console/user/add_test.php
@@ -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));
diff --git a/tests/console/user/base.php b/tests/console/user/base.php
index 83fe226f24..0d425e0b61 100644
--- a/tests/console/user/base.php
+++ b/tests/console/user/base.php
@@ -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;
diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php
index dfa8dd2acf..84936d1401 100644
--- a/tests/controller/common_helper_route.php
+++ b/tests/controller/common_helper_route.php
@@ -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;
diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php
index 7b9f92d048..89631552af 100644
--- a/tests/controller/controller_test.php
+++ b/tests/controller/controller_test.php
@@ -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));
diff --git a/tests/cron/manager_test.php b/tests/cron/manager_test.php
index e1699e6486..3cfc17fdeb 100644
--- a/tests/cron/manager_test.php
+++ b/tests/cron/manager_test.php
@@ -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(),
diff --git a/tests/dbal/auto_increment_test.php b/tests/dbal/auto_increment_test.php
index 950a4fc8f7..27d10d2843 100644
--- a/tests/dbal/auto_increment_test.php
+++ b/tests/dbal/auto_increment_test.php
@@ -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)
{
diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php
index 818d8d8e17..20ea2b3729 100644
--- a/tests/dbal/db_tools_test.php
+++ b/tests/dbal/db_tools_test.php
@@ -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)
{
diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php
index a5f587fc71..1f6cf3c8a3 100644
--- a/tests/dbal/migrator_test.php
+++ b/tests/dbal/migrator_test.php
@@ -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();
diff --git a/tests/dbal/migrator_tool_config_test.php b/tests/dbal/migrator_tool_config_test.php
index 13e0c13e3c..74d816dbcd 100644
--- a/tests/dbal/migrator_tool_config_test.php
+++ b/tests/dbal/migrator_tool_config_test.php
@@ -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());
diff --git a/tests/dbal/migrator_tool_config_text_test.php b/tests/dbal/migrator_tool_config_text_test.php
index b271c2d62e..051e0a7556 100644
--- a/tests/dbal/migrator_tool_config_text_test.php
+++ b/tests/dbal/migrator_tool_config_text_test.php
@@ -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();
diff --git a/tests/dbal/migrator_tool_module_test.php b/tests/dbal/migrator_tool_module_test.php
index 46045d2371..ecc7b384e7 100644
--- a/tests/dbal/migrator_tool_module_test.php
+++ b/tests/dbal/migrator_tool_module_test.php
@@ -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;
diff --git a/tests/dbal/migrator_tool_permission_test.php b/tests/dbal/migrator_tool_permission_test.php
index d84f6a68ff..23a3421dc8 100644
--- a/tests/dbal/migrator_tool_permission_test.php
+++ b/tests/dbal/migrator_tool_permission_test.php
@@ -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;
diff --git a/tests/dbal/sql_affected_rows_test.php b/tests/dbal/sql_affected_rows_test.php
index 07d7318358..e9fb1f2724 100644
--- a/tests/dbal/sql_affected_rows_test.php
+++ b/tests/dbal/sql_affected_rows_test.php
@@ -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();
diff --git a/tests/dbal/sql_insert_buffer_test.php b/tests/dbal/sql_insert_buffer_test.php
index eae0abceba..b0e678b9da 100644
--- a/tests/dbal/sql_insert_buffer_test.php
+++ b/tests/dbal/sql_insert_buffer_test.php
@@ -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();
diff --git a/tests/di/create_container_test.php b/tests/di/create_container_test.php
index 1fd2cbd7ee..8ecad71412 100644
--- a/tests/di/create_container_test.php
+++ b/tests/di/create_container_test.php
@@ -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');
diff --git a/tests/di/ordered_service_collection_test.php b/tests/di/ordered_service_collection_test.php
index 47e6d23744..baa9776573 100644
--- a/tests/di/ordered_service_collection_test.php
+++ b/tests/di/ordered_service_collection_test.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);
diff --git a/tests/di/service_collection_test.php b/tests/di/service_collection_test.php
index 5815b4367d..97c13ab163 100644
--- a/tests/di/service_collection_test.php
+++ b/tests/di/service_collection_test.php
@@ -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');
}
diff --git a/tests/email/email_parsing_test.php b/tests/email/email_parsing_test.php
index 34cd8f8bf0..a7f76d50a2 100644
--- a/tests/email/email_parsing_test.php
+++ b/tests/email/email_parsing_test.php
@@ -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;
diff --git a/tests/error_collector_test.php b/tests/error_collector_test.php
index 8ed89bbe52..c7701cfad0 100644
--- a/tests/error_collector_test.php
+++ b/tests/error_collector_test.php
@@ -13,7 +13,7 @@
class phpbb_error_collector_test extends phpbb_test_case
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/event/export_php_test.php b/tests/event/export_php_test.php
index 21bbb0620a..92280b6f4f 100644
--- a/tests/event/export_php_test.php
+++ b/tests/event/export_php_test.php
@@ -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();
diff --git a/tests/event/php_exporter_test.php b/tests/event/php_exporter_test.php
index b777c1e616..5c9e20aa7d 100644
--- a/tests/event/php_exporter_test.php
+++ b/tests/event/php_exporter_test.php
@@ -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/');
diff --git a/tests/extension/extension_base_test.php b/tests/extension/extension_base_test.php
index e0c2e6d549..1f44fdb234 100644
--- a/tests/extension/extension_base_test.php
+++ b/tests/extension/extension_base_test.php
@@ -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();
diff --git a/tests/extension/finder_test.php b/tests/extension/finder_test.php
index 02c70fd503..c86b81f147 100644
--- a/tests/extension/finder_test.php
+++ b/tests/extension/finder_test.php
@@ -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__) . '/',
diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php
index a1765775d8..7fac707483 100644
--- a/tests/extension/manager_test.php
+++ b/tests/extension/manager_test.php
@@ -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();
diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php
index 6b92b9b22d..38b821c7b4 100644
--- a/tests/extension/metadata_manager_test.php
+++ b/tests/extension/metadata_manager_test.php
@@ -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();
diff --git a/tests/extension/modules_test.php b/tests/extension/modules_test.php
index 20b71e2812..f8c65bc147 100644
--- a/tests/extension/modules_test.php
+++ b/tests/extension/modules_test.php
@@ -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;
diff --git a/tests/feed/attachments_base_test.php b/tests/feed/attachments_base_test.php
index 3d66c906ad..df91d8cc5d 100644
--- a/tests/feed/attachments_base_test.php
+++ b/tests/feed/attachments_base_test.php
@@ -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();
}
diff --git a/tests/files/types_base_test.php b/tests/files/types_base_test.php
index 3b1cf68d50..a5533f2bc0 100644
--- a/tests/files/types_base_test.php
+++ b/tests/files/types_base_test.php
@@ -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;
diff --git a/tests/files/types_form_test.php b/tests/files/types_form_test.php
index 25d79f6117..ffebcf603f 100644
--- a/tests/files/types_form_test.php
+++ b/tests/files/types_form_test.php
@@ -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;
diff --git a/tests/files/types_local_test.php b/tests/files/types_local_test.php
index 67e4c571f5..7468e9c4a7 100644
--- a/tests/files/types_local_test.php
+++ b/tests/files/types_local_test.php
@@ -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;
diff --git a/tests/files/types_remote_test.php b/tests/files/types_remote_test.php
index ea869bb85c..3b3d61acac 100644
--- a/tests/files/types_remote_test.php
+++ b/tests/files/types_remote_test.php
@@ -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;
diff --git a/tests/files/upload_test.php b/tests/files/upload_test.php
index a9c2dca9d9..c8857f863d 100644
--- a/tests/files/upload_test.php
+++ b/tests/files/upload_test.php
@@ -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;
diff --git a/tests/filesystem/clean_path_test.php b/tests/filesystem/clean_path_test.php
index d2dec424b4..dbb06e5e74 100644
--- a/tests/filesystem/clean_path_test.php
+++ b/tests/filesystem/clean_path_test.php
@@ -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();
diff --git a/tests/filesystem/helper_clean_path_test.php b/tests/filesystem/helper_clean_path_test.php
index fd9ed605c8..d1b5a18f02 100644
--- a/tests/filesystem/helper_clean_path_test.php
+++ b/tests/filesystem/helper_clean_path_test.php
@@ -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();
}
diff --git a/tests/filesystem/helper_is_absolute_test.php b/tests/filesystem/helper_is_absolute_test.php
index e7562bfaee..16356386d1 100644
--- a/tests/filesystem/helper_is_absolute_test.php
+++ b/tests/filesystem/helper_is_absolute_test.php
@@ -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();
}
diff --git a/tests/filesystem/helper_realpath_test.php b/tests/filesystem/helper_realpath_test.php
index ce85439504..bfb871384b 100644
--- a/tests/filesystem/helper_realpath_test.php
+++ b/tests/filesystem/helper_realpath_test.php
@@ -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();
}
diff --git a/tests/filesystem/is_absolute_test.php b/tests/filesystem/is_absolute_test.php
index 7a50989b74..55e729feb7 100644
--- a/tests/filesystem/is_absolute_test.php
+++ b/tests/filesystem/is_absolute_test.php
@@ -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();
diff --git a/tests/filesystem/realpath_test.php b/tests/filesystem/realpath_test.php
index d994935f94..3d05cd7ff2 100644
--- a/tests/filesystem/realpath_test.php
+++ b/tests/filesystem/realpath_test.php
@@ -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();
diff --git a/tests/functional/acp_permissions_test.php b/tests/functional/acp_permissions_test.php
index 0a40e76057..ccaa4aab29 100644
--- a/tests/functional/acp_permissions_test.php
+++ b/tests/functional/acp_permissions_test.php
@@ -16,7 +16,7 @@
*/
class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/functional/acp_profile_field_test.php b/tests/functional/acp_profile_field_test.php
index 7a0a6ca941..4c0414f03a 100644
--- a/tests/functional/acp_profile_field_test.php
+++ b/tests/functional/acp_profile_field_test.php
@@ -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();
diff --git a/tests/functional/acp_users_test.php b/tests/functional/acp_users_test.php
index 78028aacb8..c8d0072c28 100644
--- a/tests/functional/acp_users_test.php
+++ b/tests/functional/acp_users_test.php
@@ -16,7 +16,7 @@
*/
class phpbb_functional_acp_users_test extends phpbb_functional_test_case
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/functional/common_avatar_test_case.php b/tests/functional/common_avatar_test_case.php
index 924eb1273c..155f6e0c09 100644
--- a/tests/functional/common_avatar_test_case.php
+++ b/tests/functional/common_avatar_test_case.php
@@ -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/';
diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php
index a8d5ace4cf..b398a73e3f 100644
--- a/tests/functional/extension_acp_test.php
+++ b/tests/functional/extension_acp_test.php
@@ -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();
diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php
index 2957749e89..c5ebf761c9 100644
--- a/tests/functional/extension_controller_test.php
+++ b/tests/functional/extension_controller_test.php
@@ -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();
diff --git a/tests/functional/extension_global_lang_test.php b/tests/functional/extension_global_lang_test.php
index a1e2547745..94c80a6d9a 100644
--- a/tests/functional/extension_global_lang_test.php
+++ b/tests/functional/extension_global_lang_test.php
@@ -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();
diff --git a/tests/functional/extension_module_test.php b/tests/functional/extension_module_test.php
index d3a66b9b35..09d0124990 100644
--- a/tests/functional/extension_module_test.php
+++ b/tests/functional/extension_module_test.php
@@ -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;
diff --git a/tests/functional/extension_permission_lang_test.php b/tests/functional/extension_permission_lang_test.php
index f570d45215..e0721ad1ec 100644
--- a/tests/functional/extension_permission_lang_test.php
+++ b/tests/functional/extension_permission_lang_test.php
@@ -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,
diff --git a/tests/functional/feed_test.php b/tests/functional/feed_test.php
index 3792b0a23c..a3cdfb336d 100644
--- a/tests/functional/feed_test.php
+++ b/tests/functional/feed_test.php
@@ -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();
diff --git a/tests/functional/fileupload_form_test.php b/tests/functional/fileupload_form_test.php
index b0780172ff..b0838344de 100644
--- a/tests/functional/fileupload_form_test.php
+++ b/tests/functional/fileupload_form_test.php
@@ -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)
diff --git a/tests/functional/fileupload_remote_test.php b/tests/functional/fileupload_remote_test.php
index 0d09d5fcc8..f327981960 100644
--- a/tests/functional/fileupload_remote_test.php
+++ b/tests/functional/fileupload_remote_test.php
@@ -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;
diff --git a/tests/functional/forgot_password_test.php b/tests/functional/forgot_password_test.php
index 64fa19557f..2fd5b45f7d 100644
--- a/tests/functional/forgot_password_test.php
+++ b/tests/functional/forgot_password_test.php
@@ -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();
diff --git a/tests/functional/metadata_manager_test.php b/tests/functional/metadata_manager_test.php
index 8456c40f00..4f4fad4434 100644
--- a/tests/functional/metadata_manager_test.php
+++ b/tests/functional/metadata_manager_test.php
@@ -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();
diff --git a/tests/functional/plupload_test.php b/tests/functional/plupload_test.php
index 9d284a7e57..c3b2e5b9eb 100644
--- a/tests/functional/plupload_test.php
+++ b/tests/functional/plupload_test.php
@@ -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/');
diff --git a/tests/functional/ucp_pm_test.php b/tests/functional/ucp_pm_test.php
index ddd5c8d791..53de247202 100644
--- a/tests/functional/ucp_pm_test.php
+++ b/tests/functional/ucp_pm_test.php
@@ -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();
diff --git a/tests/functions/build_url_test.php b/tests/functions/build_url_test.php
index 95b20050d7..d1e3481b38 100644
--- a/tests/functions/build_url_test.php
+++ b/tests/functions/build_url_test.php
@@ -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;
diff --git a/tests/functions/generate_string_list.php b/tests/functions/generate_string_list.php
index 6eddb1395e..0f9975bcac 100644
--- a/tests/functions/generate_string_list.php
+++ b/tests/functions/generate_string_list.php
@@ -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();
diff --git a/tests/functions/make_clickable_email_test.php b/tests/functions/make_clickable_email_test.php
index d481bde80d..18ad789705 100644
--- a/tests/functions/make_clickable_email_test.php
+++ b/tests/functions/make_clickable_email_test.php
@@ -13,7 +13,7 @@
class phpbb_functions_make_clickable_email_test extends phpbb_test_case
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/functions/make_clickable_test.php b/tests/functions/make_clickable_test.php
index a6af12b624..d8d5eb5e0e 100644
--- a/tests/functions/make_clickable_test.php
+++ b/tests/functions/make_clickable_test.php
@@ -154,7 +154,7 @@ class phpbb_functions_make_clickable_test extends phpbb_test_case
);
}
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/functions/obtain_online_test.php b/tests/functions/obtain_online_test.php
index 77b1079802..f740decab8 100644
--- a/tests/functions/obtain_online_test.php
+++ b/tests/functions/obtain_online_test.php
@@ -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();
diff --git a/tests/functions/phpbb_get_banned_user_ids.php b/tests/functions/phpbb_get_banned_user_ids.php
index 6f7607132e..e1cb7a4636 100644
--- a/tests/functions/phpbb_get_banned_user_ids.php
+++ b/tests/functions/phpbb_get_banned_user_ids.php
@@ -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();
}
/**
diff --git a/tests/functions/user_delete_test.php b/tests/functions/user_delete_test.php
index 88680d5719..08e299dd51 100644
--- a/tests/functions/user_delete_test.php
+++ b/tests/functions/user_delete_test.php
@@ -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();
diff --git a/tests/functions/validate_date_test.php b/tests/functions/validate_date_test.php
index 9dc0db46d6..cd4e7430f3 100644
--- a/tests/functions/validate_date_test.php
+++ b/tests/functions/validate_date_test.php
@@ -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();
diff --git a/tests/functions/validate_email_test.php b/tests/functions/validate_email_test.php
index 7f8b2679d4..e163d01412 100644
--- a/tests/functions/validate_email_test.php
+++ b/tests/functions/validate_email_test.php
@@ -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();
diff --git a/tests/functions/validate_jabber_test.php b/tests/functions/validate_jabber_test.php
index 23811a94c0..dbdf10cb4a 100644
--- a/tests/functions/validate_jabber_test.php
+++ b/tests/functions/validate_jabber_test.php
@@ -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',
diff --git a/tests/functions/validate_lang_iso_test.php b/tests/functions/validate_lang_iso_test.php
index 81b56055e6..cbe5339ea5 100644
--- a/tests/functions/validate_lang_iso_test.php
+++ b/tests/functions/validate_lang_iso_test.php
@@ -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();
diff --git a/tests/functions/validate_match_test.php b/tests/functions/validate_match_test.php
index 811bed3e33..7159686066 100644
--- a/tests/functions/validate_match_test.php
+++ b/tests/functions/validate_match_test.php
@@ -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();
diff --git a/tests/functions/validate_num_test.php b/tests/functions/validate_num_test.php
index 798468759c..acbdc49614 100644
--- a/tests/functions/validate_num_test.php
+++ b/tests/functions/validate_num_test.php
@@ -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();
diff --git a/tests/functions/validate_password_test.php b/tests/functions/validate_password_test.php
index 5e34c8baba..6e4ccea3ab 100644
--- a/tests/functions/validate_password_test.php
+++ b/tests/functions/validate_password_test.php
@@ -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();
diff --git a/tests/functions/validate_string_test.php b/tests/functions/validate_string_test.php
index 7aca14c334..83ba546152 100644
--- a/tests/functions/validate_string_test.php
+++ b/tests/functions/validate_string_test.php
@@ -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();
diff --git a/tests/functions/validate_user_email_test.php b/tests/functions/validate_user_email_test.php
index 8dcec88103..a05a7808a4 100644
--- a/tests/functions/validate_user_email_test.php
+++ b/tests/functions/validate_user_email_test.php
@@ -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();
diff --git a/tests/functions/validate_username_test.php b/tests/functions/validate_username_test.php
index d310f58036..7bd8ebe307 100644
--- a/tests/functions/validate_username_test.php
+++ b/tests/functions/validate_username_test.php
@@ -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();
diff --git a/tests/functions/validate_with_method_test.php b/tests/functions/validate_with_method_test.php
index 37e05d412a..1cd610fd2f 100644
--- a/tests/functions/validate_with_method_test.php
+++ b/tests/functions/validate_with_method_test.php
@@ -18,7 +18,7 @@ class phpbb_functions_validate_with_method_test extends phpbb_test_case
{
protected $helper;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/functions_acp/build_select_test.php b/tests/functions_acp/build_select_test.php
index ebdc58fd64..9a295762c3 100644
--- a/tests/functions_acp/build_select_test.php
+++ b/tests/functions_acp/build_select_test.php
@@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
class phpbb_functions_acp_built_select_test extends phpbb_test_case
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/functions_acp/h_radio_test.php b/tests/functions_acp/h_radio_test.php
index 5ae4e91ea2..cc9d837357 100644
--- a/tests/functions_acp/h_radio_test.php
+++ b/tests/functions_acp/h_radio_test.php
@@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
class phpbb_functions_acp_h_radio_test extends phpbb_test_case
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/functions_acp/validate_config_vars_test.php b/tests/functions_acp/validate_config_vars_test.php
index 1182d659f0..7be2c60aa5 100644
--- a/tests/functions_acp/validate_config_vars_test.php
+++ b/tests/functions_acp/validate_config_vars_test.php
@@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/functions_acp/validate_range_test.php b/tests/functions_acp/validate_range_test.php
index 9e9154a43c..085787105f 100644
--- a/tests/functions_acp/validate_range_test.php
+++ b/tests/functions_acp/validate_range_test.php
@@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
class phpbb_functions_acp_validate_range_test extends phpbb_test_case
{
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/functions_content/phpbb_format_quote_test.php b/tests/functions_content/phpbb_format_quote_test.php
index cbbd46d0a9..52a792517a 100644
--- a/tests/functions_content/phpbb_format_quote_test.php
+++ b/tests/functions_content/phpbb_format_quote_test.php
@@ -18,7 +18,7 @@ class phpbb_functions_content_phpbb_format_quote_test extends phpbb_test_case
/** @var \phpbb\language\language */
protected $lang;
- public function setUp()
+ public function setUp(): void
{
global $cache, $user, $phpbb_root_path, $phpEx;
diff --git a/tests/functions_privmsgs/get_max_setting_from_group_test.php b/tests/functions_privmsgs/get_max_setting_from_group_test.php
index fbabf1222a..b96f490c88 100644
--- a/tests/functions_privmsgs/get_max_setting_from_group_test.php
+++ b/tests/functions_privmsgs/get_max_setting_from_group_test.php
@@ -23,7 +23,7 @@ class phpbb_functions_privmsgs_get_max_setting_from_group_test extends phpbb_dat
/** @var \phpbb\db\driver\driver_interface */
protected $db;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/functions_user/delete_user_test.php b/tests/functions_user/delete_user_test.php
index 8540601f1f..0241103c5d 100644
--- a/tests/functions_user/delete_user_test.php
+++ b/tests/functions_user/delete_user_test.php
@@ -19,7 +19,7 @@ class phpbb_functions_user_delete_user_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/delete_user.xml');
}
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/group/helper_test.php b/tests/group/helper_test.php
index 2377a6f47c..855663791b 100644
--- a/tests/group/helper_test.php
+++ b/tests/group/helper_test.php
@@ -16,7 +16,7 @@ class phpbb_group_helper_test extends phpbb_test_case
/** @var \phpbb\group\helper */
protected $group_helper;
- public function setUp()
+ public function setUp(): void
{
global $phpbb_root_path, $phpEx;
diff --git a/tests/groupposition/legend_test.php b/tests/groupposition/legend_test.php
index 02ddb7cbce..66fc909770 100644
--- a/tests/groupposition/legend_test.php
+++ b/tests/groupposition/legend_test.php
@@ -43,7 +43,7 @@ class phpbb_groupposition_legend_test extends phpbb_database_test_case
if ($throws_exception)
{
- $this->setExpectedException($throws_exception);
+ $this->expectException($throws_exception);
}
$test_class = new \phpbb\groupposition\legend($db, $user);
diff --git a/tests/groupposition/teampage_test.php b/tests/groupposition/teampage_test.php
index 3b916670f7..8598e5cfb0 100644
--- a/tests/groupposition/teampage_test.php
+++ b/tests/groupposition/teampage_test.php
@@ -43,7 +43,7 @@ class phpbb_groupposition_teampage_test extends phpbb_database_test_case
if ($throws_exception)
{
- $this->setExpectedException($throws_exception);
+ $this->expectException($throws_exception);
}
$test_class = new \phpbb\groupposition\teampage($db, $user, $cache);
diff --git a/tests/help/manager_test.php b/tests/help/manager_test.php
index 68534d9a32..118a38ad3e 100644
--- a/tests/help/manager_test.php
+++ b/tests/help/manager_test.php
@@ -20,7 +20,7 @@ class phpbb_help_manager_test extends phpbb_test_case
/** @var \phpbb\language\language */
protected $language;
- public function setUp()
+ public function setUp(): void
{
$this->template = $this->getMockBuilder('\phpbb\template\template')
->disableOriginalConstructor()
diff --git a/tests/installer/database_helper_test.php b/tests/installer/database_helper_test.php
index ed355884f6..9ffdad3e03 100644
--- a/tests/installer/database_helper_test.php
+++ b/tests/installer/database_helper_test.php
@@ -18,7 +18,7 @@ class phpbb_installer_database_helper_test extends phpbb_test_case
*/
private $database_helper;
- public function setUp()
+ public function setUp(): void
{
$filesystem = new \phpbb\filesystem\filesystem();
$phpbb_root_path = '';
diff --git a/tests/installer/installer_config_test.php b/tests/installer/installer_config_test.php
index 1193d7aee4..6fa8248b68 100644
--- a/tests/installer/installer_config_test.php
+++ b/tests/installer/installer_config_test.php
@@ -20,7 +20,7 @@ class phpbb_installer_config_test extends phpbb_test_case
*/
private $config;
- public function setUp()
+ public function setUp(): void
{
$phpbb_root_path = __DIR__ . './../../phpBB/';
$filesystem = $this->createMock('\phpbb\filesystem\filesystem');
diff --git a/tests/installer/module_base_test.php b/tests/installer/module_base_test.php
index 71ec2b8db2..887d29f4c6 100644
--- a/tests/installer/module_base_test.php
+++ b/tests/installer/module_base_test.php
@@ -26,7 +26,7 @@ class module_base_test extends phpbb_test_case
*/
protected $container;
- public function setUp()
+ public function setUp(): void
{
// DI container mock
$this->container = new phpbb_mock_container_builder();
diff --git a/tests/language/language_test.php b/tests/language/language_test.php
index 29b4873dcb..8b822472cd 100644
--- a/tests/language/language_test.php
+++ b/tests/language/language_test.php
@@ -16,7 +16,7 @@ class phpbb_language_test extends phpbb_test_case
/** @var \phpbb\language\language */
protected $lang;
- public function setUp()
+ public function setUp(): void
{
global $phpbb_root_path, $phpEx;
diff --git a/tests/lint_test.php b/tests/lint_test.php
index 8ab31f976c..8356389acf 100644
--- a/tests/lint_test.php
+++ b/tests/lint_test.php
@@ -45,11 +45,6 @@ class phpbb_lint_test extends phpbb_test_case
*/
public function test_lint($path)
{
- if (version_compare(PHP_VERSION, '5.3.0', '<'))
- {
- $this->markTestSkipped('phpBB uses PHP 5.3 syntax in some files, linting on PHP < 5.3 will fail');
- }
-
$cmd = sprintf('(%s -l %s) 2>&1', self::$php_binary, escapeshellarg($path));
$output = array();
$status = 1;
diff --git a/tests/lock/db_test.php b/tests/lock/db_test.php
index 5fbfa26554..e96920ed1f 100644
--- a/tests/lock/db_test.php
+++ b/tests/lock/db_test.php
@@ -22,7 +22,7 @@ class phpbb_lock_db_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml');
}
- public function setUp()
+ public function setUp(): void
{
global $db, $config;
diff --git a/tests/log/delete_test.php b/tests/log/delete_test.php
index 04aa20d9ce..503e2c2fca 100644
--- a/tests/log/delete_test.php
+++ b/tests/log/delete_test.php
@@ -20,7 +20,7 @@ class phpbb_log_delete_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/delete_log.xml');
}
- protected function setUp()
+ protected function setUp(): void
{
global $phpbb_root_path, $phpEx, $db, $phpbb_dispatcher, $auth;
diff --git a/tests/mcp/post_ip_test.php b/tests/mcp/post_ip_test.php
index 72a9f62774..f53066c9e6 100644
--- a/tests/mcp/post_ip_test.php
+++ b/tests/mcp/post_ip_test.php
@@ -23,7 +23,7 @@ class phpbb_mcp_post_ip_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/post_ip.xml');
}
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/migrator/convert_timezones_test.php b/tests/migrator/convert_timezones_test.php
index f8d780da0c..4bb0aec34f 100644
--- a/tests/migrator/convert_timezones_test.php
+++ b/tests/migrator/convert_timezones_test.php
@@ -49,7 +49,7 @@ class phpbb_migrator_convert_timezones_test extends phpbb_database_test_case
);
}
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/migrator/get_callable_from_step_test.php b/tests/migrator/get_callable_from_step_test.php
index af636f5d21..f08caf3181 100644
--- a/tests/migrator/get_callable_from_step_test.php
+++ b/tests/migrator/get_callable_from_step_test.php
@@ -13,7 +13,7 @@
class get_callable_from_step_test extends phpbb_database_test_case
{
- public function setUp()
+ public function setUp(): void
{
global $phpbb_root_path, $php_ext, $table_prefix, $phpbb_log;
diff --git a/tests/migrator/get_schema_steps_test.php b/tests/migrator/get_schema_steps_test.php
index 3d15d2b200..10accb3d68 100644
--- a/tests/migrator/get_schema_steps_test.php
+++ b/tests/migrator/get_schema_steps_test.php
@@ -13,7 +13,7 @@
class get_schema_steps_test extends phpbb_test_case
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/migrator/reverse_update_data_test.php b/tests/migrator/reverse_update_data_test.php
index b85e48c64c..b93680c2e2 100644
--- a/tests/migrator/reverse_update_data_test.php
+++ b/tests/migrator/reverse_update_data_test.php
@@ -16,7 +16,7 @@ class reverse_update_data_test extends phpbb_test_case
/** @var \phpbb\db\migration\helper */
protected $helper;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/migrator/schema_generator_test.php b/tests/migrator/schema_generator_test.php
index 1996d207ea..88257430a7 100644
--- a/tests/migrator/schema_generator_test.php
+++ b/tests/migrator/schema_generator_test.php
@@ -24,7 +24,7 @@ class schema_generator_test extends phpbb_test_case
/** @var \phpbb\db\migration\schema_generator */
protected $generator;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/mimetype/guesser_test.php b/tests/mimetype/guesser_test.php
index fa53e6c8c4..238e7ae2d6 100644
--- a/tests/mimetype/guesser_test.php
+++ b/tests/mimetype/guesser_test.php
@@ -27,7 +27,7 @@ class guesser_test extends \phpbb_test_case
protected $fileinfo_supported = false;
- public function setUp()
+ public function setUp(): void
{
global $phpbb_root_path;
@@ -181,7 +181,7 @@ class guesser_test extends \phpbb_test_case
if (!$supported)
{
- $this->setExpectedException('\LogicException');
+ $this->expectException('\LogicException');
}
$guesser = new \phpbb\mimetype\guesser($guessers);
diff --git a/tests/mock/cache.php b/tests/mock/cache.php
index 5fa3d28147..2306fd9009 100644
--- a/tests/mock/cache.php
+++ b/tests/mock/cache.php
@@ -72,13 +72,13 @@ class phpbb_mock_cache implements \phpbb\cache\driver\driver_interface
}
}
- public function checkVar(PHPUnit_Framework_Assert $test, $var_name, $data)
+ public function checkVar(PHPUnit\Framework\Assert $test, $var_name, $data)
{
$test->assertTrue(isset($this->data[$var_name]));
$test->assertEquals($data, $this->data[$var_name]);
}
- public function checkAssociativeVar(PHPUnit_Framework_Assert $test, $var_name, $data, $sort = true)
+ public function checkAssociativeVar(PHPUnit\Framework\Assert $test, $var_name, $data, $sort = true)
{
$test->assertTrue(isset($this->data[$var_name]));
@@ -93,12 +93,12 @@ class phpbb_mock_cache implements \phpbb\cache\driver\driver_interface
$test->assertEquals($data, $this->data[$var_name]);
}
- public function checkVarUnset(PHPUnit_Framework_Assert $test, $var_name)
+ public function checkVarUnset(PHPUnit\Framework\Assert $test, $var_name)
{
$test->assertFalse(isset($this->data[$var_name]));
}
- public function check(PHPUnit_Framework_Assert $test, $data, $ignore_db_info = true)
+ public function check(PHPUnit\Framework\Assert $test, $data, $ignore_db_info = true)
{
$cache_data = $this->data;
diff --git a/tests/mock/session_testable.php b/tests/mock/session_testable.php
index 5a57eecf61..7828a864d4 100644
--- a/tests/mock/session_testable.php
+++ b/tests/mock/session_testable.php
@@ -30,14 +30,14 @@ class phpbb_mock_session_testable extends \phpbb\session
/**
* Checks if the cookies were set correctly.
*
- * @param PHPUnit_Framework_Assert test The test from which this is called
+ * @param PHPUnit\Framework\Assert test The test from which this is called
* @param array(string => mixed) cookies The cookie data to check against.
* The keys are cookie names, the values can either be null to
* check only the existence of the cookie, or an array(d, t),
* where d is the cookie data to check, or null to skip the
* check and t is the cookie time to check, or null to skip.
*/
- public function check_cookies(PHPUnit_Framework_Assert $test, $cookies)
+ public function check_cookies(PHPUnit\Framework\Assert $test, $cookies)
{
$test->assertEquals(array_keys($cookies), array_keys($this->_cookies), 'Incorrect cookies were set');
diff --git a/tests/notification/base.php b/tests/notification/base.php
index 80b9a0d777..f7faf50d68 100644
--- a/tests/notification/base.php
+++ b/tests/notification/base.php
@@ -50,7 +50,7 @@ abstract class phpbb_tests_notification_base extends phpbb_database_test_case
);
}
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/notification/convert_test.php b/tests/notification/convert_test.php
index 4a7fd89409..d4a33ff537 100644
--- a/tests/notification/convert_test.php
+++ b/tests/notification/convert_test.php
@@ -21,7 +21,7 @@ class phpbb_notification_convert_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/convert.xml');
}
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
diff --git a/tests/notification/submit_post_base.php b/tests/notification/submit_post_base.php
index c011011ba7..fe0e937837 100644
--- a/tests/notification/submit_post_base.php
+++ b/tests/notification/submit_post_base.php
@@ -47,7 +47,7 @@ abstract class phpbb_notification_submit_post_base extends phpbb_database_test_c
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/submit_post_' . $this->item_type . '.xml');
}
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/notification/submit_post_type_bookmark_test.php b/tests/notification/submit_post_type_bookmark_test.php
index 7c3b9f938f..9af247b3c3 100644
--- a/tests/notification/submit_post_type_bookmark_test.php
+++ b/tests/notification/submit_post_type_bookmark_test.php
@@ -17,7 +17,7 @@ class phpbb_notification_submit_post_type_bookmark_test extends phpbb_notificati
{
protected $item_type = 'notification.type.bookmark';
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/notification/submit_post_type_post_in_queue_test.php b/tests/notification/submit_post_type_post_in_queue_test.php
index 1390e92d96..bced0ea48c 100644
--- a/tests/notification/submit_post_type_post_in_queue_test.php
+++ b/tests/notification/submit_post_type_post_in_queue_test.php
@@ -17,7 +17,7 @@ class phpbb_notification_submit_post_type_post_in_queue_test extends phpbb_notif
{
protected $item_type = 'notification.type.post_in_queue';
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/notification/submit_post_type_post_test.php b/tests/notification/submit_post_type_post_test.php
index 037c326bc0..5580d0924e 100644
--- a/tests/notification/submit_post_type_post_test.php
+++ b/tests/notification/submit_post_type_post_test.php
@@ -17,7 +17,7 @@ class phpbb_notification_submit_post_type_post_test extends phpbb_notification_s
{
protected $item_type = 'notification.type.post';
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/notification/submit_post_type_quote_test.php b/tests/notification/submit_post_type_quote_test.php
index 3fab8c05ba..655f12661b 100644
--- a/tests/notification/submit_post_type_quote_test.php
+++ b/tests/notification/submit_post_type_quote_test.php
@@ -17,7 +17,7 @@ class phpbb_notification_submit_post_type_quote_test extends phpbb_notification_
{
protected $item_type = 'notification.type.quote';
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/notification/submit_post_type_topic_test.php b/tests/notification/submit_post_type_topic_test.php
index a51f0780b1..070b2fa21e 100644
--- a/tests/notification/submit_post_type_topic_test.php
+++ b/tests/notification/submit_post_type_topic_test.php
@@ -17,7 +17,7 @@ class phpbb_notification_submit_post_type_topic_test extends phpbb_notification_
{
protected $item_type = 'notification.type.topic';
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/notification/user_list_trim_test.php b/tests/notification/user_list_trim_test.php
index 0de6294491..bf3058c342 100644
--- a/tests/notification/user_list_trim_test.php
+++ b/tests/notification/user_list_trim_test.php
@@ -20,7 +20,7 @@ class phpbb_notification_user_list_trim_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/user_list_trim.xml');
}
- public function setUp()
+ public function setUp(): void
{
global $phpbb_root_path, $phpEx, $phpbb_dispatcher, $user, $cache, $auth;
diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php
index be20d79282..cd7420a0eb 100644
--- a/tests/pagination/pagination_test.php
+++ b/tests/pagination/pagination_test.php
@@ -22,7 +22,7 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
return implode('-', func_get_args());
}
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/passwords/drivers_test.php b/tests/passwords/drivers_test.php
index 300c093f12..547ee33f2e 100644
--- a/tests/passwords/drivers_test.php
+++ b/tests/passwords/drivers_test.php
@@ -13,7 +13,7 @@
class phpbb_passwords_helper_test extends \phpbb_test_case
{
- public function setUp()
+ public function setUp(): void
{
// Prepare dependencies for drivers
$config = new \phpbb\config\config(array());
diff --git a/tests/passwords/manager_test.php b/tests/passwords/manager_test.php
index 40e2849f9c..dc5c539316 100644
--- a/tests/passwords/manager_test.php
+++ b/tests/passwords/manager_test.php
@@ -19,7 +19,7 @@ class phpbb_passwords_manager_test extends \phpbb_test_case
protected $default_pw = 'foobar';
- public function setUp()
+ public function setUp(): void
{
// Prepare dependencies for manager and driver
$config = new \phpbb\config\config(array());
diff --git a/tests/path_helper/path_helper_test.php b/tests/path_helper/path_helper_test.php
index f22606843c..1479c57051 100644
--- a/tests/path_helper/path_helper_test.php
+++ b/tests/path_helper/path_helper_test.php
@@ -19,7 +19,7 @@ class phpbb_path_helper_test extends phpbb_test_case
protected $path_helper;
protected $phpbb_root_path = '';
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/profilefields/type_bool_test.php b/tests/profilefields/type_bool_test.php
index 66e1578e8a..3e7cace288 100644
--- a/tests/profilefields/type_bool_test.php
+++ b/tests/profilefields/type_bool_test.php
@@ -23,7 +23,7 @@ class phpbb_profilefield_type_bool_test extends phpbb_test_case
* @access public
* @return void
*/
- public function setUp()
+ public function setUp(): void
{
global $phpbb_root_path, $phpEx;
diff --git a/tests/profilefields/type_date_test.php b/tests/profilefields/type_date_test.php
index dc547c2d10..b70aa60368 100644
--- a/tests/profilefields/type_date_test.php
+++ b/tests/profilefields/type_date_test.php
@@ -23,7 +23,7 @@ class phpbb_profilefield_type_date_test extends phpbb_test_case
* @access public
* @return null
*/
- public function setUp()
+ public function setUp(): void
{
global $phpbb_root_path, $phpEx;
diff --git a/tests/profilefields/type_dropdown_test.php b/tests/profilefields/type_dropdown_test.php
index 96b2ad31be..738801d524 100644
--- a/tests/profilefields/type_dropdown_test.php
+++ b/tests/profilefields/type_dropdown_test.php
@@ -23,7 +23,7 @@ class phpbb_profilefield_type_dropdown_test extends phpbb_test_case
* @access public
* @return null
*/
- public function setUp()
+ public function setUp(): void
{
global $phpbb_root_path, $phpEx;
diff --git a/tests/profilefields/type_googleplus_test.php b/tests/profilefields/type_googleplus_test.php
index 06ba231e68..a5f934ea17 100644
--- a/tests/profilefields/type_googleplus_test.php
+++ b/tests/profilefields/type_googleplus_test.php
@@ -15,7 +15,7 @@ class phpbb_profilefield_type_googleplus_test extends phpbb_test_case
{
protected $field;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/profilefields/type_int_test.php b/tests/profilefields/type_int_test.php
index 326c6051b3..943f130835 100644
--- a/tests/profilefields/type_int_test.php
+++ b/tests/profilefields/type_int_test.php
@@ -22,7 +22,7 @@ class phpbb_profilefield_type_int_test extends phpbb_test_case
* @access public
* @return null
*/
- public function setUp()
+ public function setUp(): void
{
global $phpbb_root_path, $phpEx;
diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php
index 946e513e96..19bfbbc926 100644
--- a/tests/profilefields/type_string_test.php
+++ b/tests/profilefields/type_string_test.php
@@ -22,7 +22,7 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case
* @access public
* @return null
*/
- public function setUp()
+ public function setUp(): void
{
global $config, $request, $user, $cache, $phpbb_root_path, $phpEx;
diff --git a/tests/profilefields/type_url_test.php b/tests/profilefields/type_url_test.php
index 18aa214e3d..5ed5fb4c2f 100644
--- a/tests/profilefields/type_url_test.php
+++ b/tests/profilefields/type_url_test.php
@@ -26,7 +26,7 @@ class phpbb_profilefield_type_url_test extends phpbb_test_case
* @access public
* @return null
*/
- public function setUp()
+ public function setUp(): void
{
global $config, $request, $user, $cache, $phpbb_root_path, $phpEx;
diff --git a/tests/random/gen_rand_string_test.php b/tests/random/gen_rand_string_test.php
index 428db6ac98..044fd3cc15 100644
--- a/tests/random/gen_rand_string_test.php
+++ b/tests/random/gen_rand_string_test.php
@@ -17,7 +17,7 @@ class phpbb_random_gen_rand_string_test extends phpbb_test_case
const MIN_STRING_LENGTH = 1;
const MAX_STRING_LENGTH = 15;
- public function setUp()
+ public function setUp(): void
{
global $config;
diff --git a/tests/regex/email_test.php b/tests/regex/email_test.php
index 5187b8bda6..7b10b0a6ef 100644
--- a/tests/regex/email_test.php
+++ b/tests/regex/email_test.php
@@ -15,7 +15,7 @@ class phpbb_regex_email_test extends phpbb_test_case
{
protected $regex;
- public function setUp()
+ public function setUp(): void
{
$this->regex = '#^' . get_preg_expression('email') . '$#i';
}
@@ -36,7 +36,7 @@ class phpbb_regex_email_test extends phpbb_test_case
//array('"John Doe"@example.com'),
//array('Alice@[192.168.2.1]'), // IPv4
//array('Bob@[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]'), // IPv6
-
+
// http://fightingforalostcause.net/misc/2006/compare-email-regex.php
array('l3tt3rsAndNumb3rs@domain.com'),
array('has-dash@domain.com'),
@@ -80,7 +80,7 @@ class phpbb_regex_email_test extends phpbb_test_case
array('abc,def@example.com'), // invalid character ,
array('abc
def@example.com'), // invalid character >
-
+
// http://fightingforalostcause.net/misc/2006/compare-email-regex.php
array('missingDomain@.com'),
array('@missingLocal.org'),
diff --git a/tests/regex/ipv4_test.php b/tests/regex/ipv4_test.php
index e21a2d77fa..5d859c240b 100644
--- a/tests/regex/ipv4_test.php
+++ b/tests/regex/ipv4_test.php
@@ -15,7 +15,7 @@ class phpbb_regex_ipv4_test extends phpbb_test_case
{
protected $regex;
- public function setUp()
+ public function setUp(): void
{
$this->regex = get_preg_expression('ipv4');
}
diff --git a/tests/regex/ipv6_test.php b/tests/regex/ipv6_test.php
index 223161df7f..d4a86015ae 100644
--- a/tests/regex/ipv6_test.php
+++ b/tests/regex/ipv6_test.php
@@ -15,7 +15,7 @@ class phpbb_regex_ipv6_test extends phpbb_test_case
{
protected $regex;
- public function setUp()
+ public function setUp(): void
{
$this->regex = get_preg_expression('ipv6');
}
diff --git a/tests/request/request_test.php b/tests/request/request_test.php
index 47798177e1..d03253ceb9 100644
--- a/tests/request/request_test.php
+++ b/tests/request/request_test.php
@@ -19,7 +19,7 @@ class phpbb_request_test extends phpbb_test_case
/** @var \phpbb\request\request */
private $request;
- protected function setUp()
+ protected function setUp(): void
{
// populate super globals
$_POST['test'] = 1;
@@ -264,7 +264,7 @@ class phpbb_request_test extends phpbb_test_case
/**
* Makes sure super globals work properly after these tests
*/
- protected function tearDown()
+ protected function tearDown(): void
{
$this->request->enable_super_globals();
}
diff --git a/tests/request/request_var_test.php b/tests/request/request_var_test.php
index 84c81c4e84..8dc8e4c7c7 100644
--- a/tests/request/request_var_test.php
+++ b/tests/request/request_var_test.php
@@ -16,7 +16,7 @@ class phpbb_request_var_test extends phpbb_test_case
/**
* Makes sure request_var has its standard behaviour.
*/
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
request_var(false, false, false, false, false);
diff --git a/tests/request/type_cast_helper_test.php b/tests/request/type_cast_helper_test.php
index 6407dca894..5810c67b78 100644
--- a/tests/request/type_cast_helper_test.php
+++ b/tests/request/type_cast_helper_test.php
@@ -15,7 +15,7 @@ class phpbb_type_cast_helper_test extends phpbb_test_case
{
private $type_cast_helper;
- protected function setUp()
+ protected function setUp(): void
{
$this->type_cast_helper = new \phpbb\request\type_cast_helper();
}
diff --git a/tests/search/mysql_test.php b/tests/search/mysql_test.php
index 3a791f5e81..7d3917296e 100644
--- a/tests/search/mysql_test.php
+++ b/tests/search/mysql_test.php
@@ -23,7 +23,7 @@ class phpbb_search_mysql_test extends phpbb_search_common_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/../fixtures/empty.xml');
}
- protected function setUp()
+ protected function setUp(): void
{
global $phpbb_root_path, $phpEx, $config, $user, $cache;
diff --git a/tests/search/native_test.php b/tests/search/native_test.php
index 29d0d0a8d3..954f4c3d36 100644
--- a/tests/search/native_test.php
+++ b/tests/search/native_test.php
@@ -23,7 +23,7 @@ class phpbb_search_native_test extends phpbb_search_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/posts.xml');
}
- protected function setUp()
+ protected function setUp(): void
{
global $phpbb_root_path, $phpEx, $config, $user, $cache;
diff --git a/tests/search/postgres_test.php b/tests/search/postgres_test.php
index 97cca0e70c..7e2a6cec85 100644
--- a/tests/search/postgres_test.php
+++ b/tests/search/postgres_test.php
@@ -23,7 +23,7 @@ class phpbb_search_postgres_test extends phpbb_search_common_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/../fixtures/empty.xml');
}
- protected function setUp()
+ protected function setUp(): void
{
global $phpbb_root_path, $phpEx, $config, $user, $cache;
diff --git a/tests/security/base.php b/tests/security/base.php
index d2abdbc362..ad518b5543 100644
--- a/tests/security/base.php
+++ b/tests/security/base.php
@@ -18,7 +18,7 @@ abstract class phpbb_security_test_base extends phpbb_test_case
/**
* Set up the required user object and server variables for the suites
*/
- protected function setUp()
+ protected function setUp(): void
{
global $user, $phpbb_root_path, $phpEx, $request, $symfony_request, $phpbb_filesystem;
@@ -60,7 +60,7 @@ abstract class phpbb_security_test_base extends phpbb_test_case
$user->page = \phpbb\session::extract_current_page($phpbb_root_path);
}
- protected function tearDown()
+ protected function tearDown(): void
{
global $user;
$user = NULL;
diff --git a/tests/security/hash_test.php b/tests/security/hash_test.php
index 113c32bf7f..40d14f24bf 100644
--- a/tests/security/hash_test.php
+++ b/tests/security/hash_test.php
@@ -13,7 +13,7 @@
class phpbb_security_hash_test extends phpbb_test_case
{
- public function setUp()
+ public function setUp(): void
{
global $phpbb_container;
diff --git a/tests/security/redirect_test.php b/tests/security/redirect_test.php
index 36a3a90a91..9f1b2d99ff 100644
--- a/tests/security/redirect_test.php
+++ b/tests/security/redirect_test.php
@@ -74,7 +74,7 @@ class phpbb_security_redirect_test extends phpbb_security_test_base
return $this->path_helper;
}
- protected function setUp()
+ protected function setUp(): void
{
global $phpbb_dispatcher;
diff --git a/tests/session/check_ban_test.php b/tests/session/check_ban_test.php
index 04da5f08b9..5d91739eaa 100644
--- a/tests/session/check_ban_test.php
+++ b/tests/session/check_ban_test.php
@@ -17,6 +17,7 @@ class phpbb_session_check_ban_test extends phpbb_session_test_case
{
protected $user_id = 4;
protected $key_id = 4;
+ /** @var \phpbb\session */
protected $session;
protected $backup_cache;
@@ -37,7 +38,7 @@ class phpbb_session_check_ban_test extends phpbb_session_test_case
);
}
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
// Get session here so that config is mocked correctly
@@ -59,7 +60,7 @@ class phpbb_session_check_ban_test extends phpbb_session_test_case
);
}
- public function tearDown()
+ public function tearDown(): void
{
parent::tearDown();
// Set cache back to what it was before the test changed it
@@ -74,7 +75,7 @@ class phpbb_session_check_ban_test extends phpbb_session_test_case
{
$is_banned = $this->session->check_ban($user_id, $user_ips, $user_email, $return);
}
- catch (PHPUnit_Framework_Error_Notice $e)
+ catch (PHPUnit\Framework\Error\Notice $e)
{
// User error was triggered, user must have been banned
$is_banned = true;
diff --git a/tests/session/garbage_collection_test.php b/tests/session/garbage_collection_test.php
index 3dc591a328..d361e022da 100644
--- a/tests/session/garbage_collection_test.php
+++ b/tests/session/garbage_collection_test.php
@@ -22,7 +22,7 @@ class phpbb_session_garbage_collection_test extends phpbb_session_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/sessions_garbage.xml');
}
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
$this->session = $this->session_factory->get_session($this->db);
diff --git a/tests/session/testable_factory.php b/tests/session/testable_factory.php
index 6f8b49122b..d381b4cbbd 100644
--- a/tests/session/testable_factory.php
+++ b/tests/session/testable_factory.php
@@ -120,10 +120,10 @@ class phpbb_session_testable_factory
/**
* Check if the cache used for the generated session contains correct data.
*
- * @param PHPUnit_Framework_Assert $test The test case to call assert methods
+ * @param PHPUnit\Framework\Assert $test The test case to call assert methods
* on
*/
- public function check(PHPUnit_Framework_Assert $test)
+ public function check(PHPUnit\Framework\Assert $test)
{
$this->cache->check($test, $this->get_cache_data());
}
diff --git a/tests/storage/adapter/local_subfolders_test.php b/tests/storage/adapter/local_subfolders_test.php
index 250e1973c7..de02fceefa 100644
--- a/tests/storage/adapter/local_subfolders_test.php
+++ b/tests/storage/adapter/local_subfolders_test.php
@@ -19,7 +19,7 @@
protected $filesystem;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
@@ -33,7 +33,7 @@
mkdir($this->path);
}
- public function tearDown()
+ public function tearDown(): void
{
$this->adapter = null;
rmdir($this->path);
diff --git a/tests/storage/adapter/local_test.php b/tests/storage/adapter/local_test.php
index eb4b5e0dcf..e44f0e2023 100644
--- a/tests/storage/adapter/local_test.php
+++ b/tests/storage/adapter/local_test.php
@@ -19,7 +19,7 @@
protected $filesystem;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
@@ -33,7 +33,7 @@
mkdir($this->path);
}
- public function tearDown()
+ public function tearDown(): void
{
$this->adapter = null;
rmdir($this->path);
diff --git a/tests/template/context_test.php b/tests/template/context_test.php
index 52ce6c8fde..a1be672f51 100644
--- a/tests/template/context_test.php
+++ b/tests/template/context_test.php
@@ -14,7 +14,7 @@
class context_test extends phpbb_test_case
{
protected $context;
- protected function setUp()
+ protected function setUp(): void
{
$this->context = new \phpbb\template\context();
@@ -31,7 +31,7 @@ class context_test extends phpbb_test_case
'SUBFOO' => 'subfoo' . $j,
'SUBBAR' => 'subbar' . $j,
));
-
+
for ($k = 0; $k < 10; $k++)
{
$this->context->assign_block_vars('block' . $i . '.subblock.subsubblock', array(
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 727f35e9d2..01c132e032 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -521,7 +521,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
$this->template->set_filenames(array('test' => $filename));
$this->assertFileNotExists($this->template_path . '/' . $filename, 'Testing missing file, file cannot exist');
- $this->setExpectedException('Twig_Error_Loader');
+ $this->expectException('Twig_Error_Loader');
$this->display('test');
}
@@ -529,7 +529,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
public function test_invalid_handle()
{
- $this->setExpectedException('Twig_Error_Loader');
+ $this->expectException('Twig_Error_Loader');
$this->display('test');
}
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
index 64c5becb22..3a64d70f30 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -117,7 +117,7 @@ class phpbb_template_template_test_case extends phpbb_test_case
$this->template->set_custom_style('tests', $this->template_path);
}
- protected function setUp()
+ protected function setUp(): void
{
// Test the engine can be used
$this->setup_engine();
@@ -129,7 +129,7 @@ class phpbb_template_template_test_case extends phpbb_test_case
$phpbb_filesystem = new \phpbb\filesystem\filesystem();
}
- protected function tearDown()
+ protected function tearDown(): void
{
if ($this->template)
{
diff --git a/tests/template/templates/expressions.html b/tests/template/templates/expressions.html
index e1283f165f..17a5b8d265 100644
--- a/tests/template/templates/expressions.html
+++ b/tests/template/templates/expressions.html
@@ -3,7 +3,7 @@
failpass
passfail
failpass
-passfail
+passfail
failpass
passfail
passfail
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php
index abfdf39940..769e523e06 100644
--- a/tests/test_framework/phpbb_database_test_case.php
+++ b/tests/test_framework/phpbb_database_test_case.php
@@ -11,7 +11,9 @@
*
*/
-abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_TestCase
+use PHPUnit\DbUnit\TestCase;
+
+abstract class phpbb_database_test_case extends TestCase
{
static private $already_connected;
@@ -99,7 +101,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
parent::tearDownAfterClass();
}
- protected function tearDown()
+ protected function tearDown(): void
{
parent::tearDown();
@@ -113,7 +115,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
}
}
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
@@ -146,7 +148,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
* Create xml data set for insertion into database
*
* @param string $path Path to fixture XML
- * @return PHPUnit_Extensions_Database_DataSet_DefaultDataSet|PHPUnit_Extensions_Database_DataSet_XmlDataSet
+ * @return PHPUnit\DbUnit\DataSet\DefaultDataSet|PHPUnit\DbUnit\DataSet\XmlDataSet
*/
public function createXMLDataSet($path)
{
@@ -155,11 +157,11 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
// Extend XML data set on MSSQL
if (strpos($this->get_database_config()['dbms'], 'mssql') !== false)
{
- $newXmlData = new PHPUnit_Extensions_Database_DataSet_DefaultDataSet();
+ $newXmlData = new PHPUnit\DbUnit\DataSet\DefaultDataSet([]);
$db = $this->new_dbal();
foreach ($this->fixture_xml_data as $key => $value)
{
- /** @var \PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData $tableMetaData */
+ /** @var PHPUnit\DbUnit\DataSet\DefaultTableMetaData $tableMetaData */
$tableMetaData = $value->getTableMetaData();
$columns = $tableMetaData->getColumns();
$primaryKeys = $tableMetaData->getPrimaryKeys();
@@ -201,8 +203,8 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
$columns[] = 'mssqlindex';
}
- $newMetaData = new PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData($key, $columns, $primaryKeys);
- $newTable = new PHPUnit_Extensions_Database_DataSet_DefaultTable($newMetaData);
+ $newMetaData = new PHPUnit\DbUnit\DataSet\DefaultTableMetaData($key, $columns, $primaryKeys);
+ $newTable = new PHPUnit\DbUnit\DataSet\DefaultTable($newMetaData);
for ($i = 0; $i < $value->getRowCount(); $i++)
{
$dataRow = $value->getRow($i);
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index ab9b3dbae3..129c6a57ad 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -75,7 +75,7 @@ class phpbb_functional_test_case extends phpbb_test_case
return array();
}
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
@@ -114,7 +114,7 @@ class phpbb_functional_test_case extends phpbb_test_case
}
}
- protected function tearDown()
+ protected function tearDown(): void
{
parent::tearDown();
@@ -502,7 +502,7 @@ class phpbb_functional_test_case extends phpbb_test_case
$this->disable_ext($extension);
$this->delete_ext_data($extension);
}
-
+
static private function recreate_database($config)
{
$db_conn_mgr = new phpbb_database_test_connection_manager($config);
@@ -911,7 +911,7 @@ class phpbb_functional_test_case extends phpbb_test_case
* @param string $haystack Search this
* @param string $message Optional failure message
*/
- public function assertContainsLang($needle, $haystack, $message = null)
+ public function assertContainsLang($needle, $haystack, $message = '')
{
$this->assertContains(html_entity_decode($this->lang($needle), ENT_QUOTES), $haystack, $message);
}
@@ -923,7 +923,7 @@ class phpbb_functional_test_case extends phpbb_test_case
* @param string $haystack Search this
* @param string $message Optional failure message
*/
- public function assertNotContainsLang($needle, $haystack, $message = null)
+ public function assertNotContainsLang($needle, $haystack, $message = '')
{
$this->assertNotContains(html_entity_decode($this->lang($needle), ENT_QUOTES), $haystack, $message);
}
diff --git a/tests/test_framework/phpbb_session_test_case.php b/tests/test_framework/phpbb_session_test_case.php
index 207659b3bd..86333298fd 100644
--- a/tests/test_framework/phpbb_session_test_case.php
+++ b/tests/test_framework/phpbb_session_test_case.php
@@ -25,7 +25,7 @@ abstract class phpbb_session_test_case extends phpbb_database_test_case
/** @var \phpbb\db\driver\driver_interface */
protected $db;
- function setUp()
+ function setUp(): void
{
parent::setUp();
diff --git a/tests/test_framework/phpbb_test_case.php b/tests/test_framework/phpbb_test_case.php
index 01d26fb67d..b21e917a61 100644
--- a/tests/test_framework/phpbb_test_case.php
+++ b/tests/test_framework/phpbb_test_case.php
@@ -11,7 +11,9 @@
*
*/
-class phpbb_test_case extends PHPUnit_Framework_TestCase
+use PHPUnit\Framework\TestCase;
+
+class phpbb_test_case extends TestCase
{
protected $test_case_helpers;
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php
index 367b5f14d2..807a64d810 100644
--- a/tests/test_framework/phpbb_test_case_helpers.php
+++ b/tests/test_framework/phpbb_test_case_helpers.php
@@ -81,17 +81,17 @@ class phpbb_test_case_helpers
{
case E_NOTICE:
case E_STRICT:
- PHPUnit_Framework_Error_Notice::$enabled = true;
- $exceptionName = 'PHPUnit_Framework_Error_Notice';
+ PHPUnit\Framework\Error\Notice::$enabled = true;
+ $exceptionName = 'PHPUnit\Framework\Error\Notice';
break;
case E_WARNING:
- PHPUnit_Framework_Error_Warning::$enabled = true;
- $exceptionName = 'PHPUnit_Framework_Error_Warning';
+ PHPUnit\Framework\Error\Warning::$enabled = true;
+ $exceptionName = 'PHPUnit\Framework\Error\Warning';
break;
default:
- $exceptionName = 'PHPUnit_Framework_Error';
+ $exceptionName = 'PHPUnit\Framework\Error\Error';
break;
}
$this->expectedTriggerError = true;
diff --git a/tests/test_framework/phpbb_ui_test_case.php b/tests/test_framework/phpbb_ui_test_case.php
index 0089d52bab..006494e277 100644
--- a/tests/test_framework/phpbb_ui_test_case.php
+++ b/tests/test_framework/phpbb_ui_test_case.php
@@ -52,15 +52,10 @@ class phpbb_ui_test_case extends phpbb_test_case
{
parent::setUpBeforeClass();
- if (version_compare(PHP_VERSION, '5.3.19', '<'))
- {
- self::markTestSkipped('UI test case requires at least PHP 5.3.19.');
- }
- else if (!class_exists('\Facebook\WebDriver\Remote\RemoteWebDriver'))
+ if (!class_exists('\Facebook\WebDriver\Remote\RemoteWebDriver'))
{
self::markTestSkipped(
- 'Could not find RemoteWebDriver class. ' .
- 'Run "php ../composer.phar install" from the tests folder.'
+ 'Could not find RemoteWebDriver class.'
);
}
@@ -100,7 +95,7 @@ class phpbb_ui_test_case extends phpbb_test_case
return array();
}
- public function setUp()
+ public function setUp(): void
{
if (!self::$install_success)
{
@@ -132,7 +127,7 @@ class phpbb_ui_test_case extends phpbb_test_case
}
}
- protected function tearDown()
+ protected function tearDown(): void
{
parent::tearDown();
@@ -419,7 +414,7 @@ class phpbb_ui_test_case extends phpbb_test_case
$this->disable_ext($extension);
$this->delete_ext_data($extension);
}
-
+
protected function get_cache_driver()
{
if (!$this->cache)
diff --git a/tests/text_formatter/s9e/factory_test.php b/tests/text_formatter/s9e/factory_test.php
index 1505609684..d3be7d2fb4 100644
--- a/tests/text_formatter/s9e/factory_test.php
+++ b/tests/text_formatter/s9e/factory_test.php
@@ -15,7 +15,7 @@ require_once __DIR__ . '/../../test_framework/phpbb_database_test_case.php';
class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
{
- public function setUp()
+ public function setUp(): void
{
$this->cache = new phpbb_mock_cache;
$this->dispatcher = new phpbb_mock_event_dispatcher;
diff --git a/tests/text_processing/decode_message_test.php b/tests/text_processing/decode_message_test.php
index e2402e721a..805dd89039 100644
--- a/tests/text_processing/decode_message_test.php
+++ b/tests/text_processing/decode_message_test.php
@@ -13,7 +13,7 @@
class phpbb_text_processing_decode_message_test extends phpbb_test_case
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/text_processing/generate_text_for_display_test.php b/tests/text_processing/generate_text_for_display_test.php
index 22d6d26c75..f7da27cc35 100644
--- a/tests/text_processing/generate_text_for_display_test.php
+++ b/tests/text_processing/generate_text_for_display_test.php
@@ -13,7 +13,7 @@
class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_case
{
- public function setUp()
+ public function setUp(): void
{
global $cache, $user, $phpbb_dispatcher;
diff --git a/tests/text_processing/generate_text_for_storage_test.php b/tests/text_processing/generate_text_for_storage_test.php
index f0588fec4f..c6c62c7579 100644
--- a/tests/text_processing/generate_text_for_storage_test.php
+++ b/tests/text_processing/generate_text_for_storage_test.php
@@ -13,7 +13,7 @@
class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_case
{
- public function setUp()
+ public function setUp(): void
{
global $config, $phpbb_container, $phpbb_dispatcher;
diff --git a/tests/text_reparser/base_test.php b/tests/text_reparser/base_test.php
index 2c6844b063..59604da4e3 100644
--- a/tests/text_reparser/base_test.php
+++ b/tests/text_reparser/base_test.php
@@ -17,7 +17,7 @@ class phpbb_textreparser_base_test extends phpbb_database_test_case
{
protected $db;
- public function setUp()
+ public function setUp(): void
{
global $config;
if (!isset($config))
diff --git a/tests/text_reparser/manager_test.php b/tests/text_reparser/manager_test.php
index df6adacb66..afa557deff 100644
--- a/tests/text_reparser/manager_test.php
+++ b/tests/text_reparser/manager_test.php
@@ -30,7 +30,7 @@ class phpbb_text_reparser_manager_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config_text.xml');
}
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/text_reparser/plugins/contact_admin_info_test.php b/tests/text_reparser/plugins/contact_admin_info_test.php
index 757b02be39..690d3a4046 100644
--- a/tests/text_reparser/plugins/contact_admin_info_test.php
+++ b/tests/text_reparser/plugins/contact_admin_info_test.php
@@ -39,7 +39,7 @@ class phpbb_textreparser_contact_admin_info_test extends phpbb_database_test_cas
return $rows;
}
- public function setUp()
+ public function setUp(): void
{
global $config;
if (!isset($config))
diff --git a/tests/text_reparser/plugins/poll_option_test.php b/tests/text_reparser/plugins/poll_option_test.php
index 177faac51d..32fb8a0411 100644
--- a/tests/text_reparser/plugins/poll_option_test.php
+++ b/tests/text_reparser/plugins/poll_option_test.php
@@ -39,7 +39,7 @@ class phpbb_textreparser_poll_option_test extends phpbb_database_test_case
return $rows;
}
- public function setUp()
+ public function setUp(): void
{
global $config;
if (!isset($config))
diff --git a/tests/text_reparser/plugins/test_row_based_plugin.php b/tests/text_reparser/plugins/test_row_based_plugin.php
index 3e9ff09448..cf913c9c1e 100644
--- a/tests/text_reparser/plugins/test_row_based_plugin.php
+++ b/tests/text_reparser/plugins/test_row_based_plugin.php
@@ -39,7 +39,7 @@ abstract class phpbb_textreparser_test_row_based_plugin extends phpbb_database_t
return $rows;
}
- public function setUp()
+ public function setUp(): void
{
global $config;
if (!isset($config))
diff --git a/tests/tree/nestedset_forum_base.php b/tests/tree/nestedset_forum_base.php
index 498c6a69a2..e91e816b2a 100644
--- a/tests/tree/nestedset_forum_base.php
+++ b/tests/tree/nestedset_forum_base.php
@@ -48,7 +48,7 @@ class phpbb_tests_tree_nestedset_forum_base extends phpbb_database_test_case
$lock,
$db;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php
index e8b5d22205..656b801372 100644
--- a/tests/upload/filespec_test.php
+++ b/tests/upload/filespec_test.php
@@ -28,7 +28,7 @@ class phpbb_filespec_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;
@@ -101,7 +101,7 @@ class phpbb_filespec_test extends phpbb_test_case
return $filespec->set_upload_ary(array_merge($upload_ary, $override));
}
- protected function tearDown()
+ protected function tearDown(): void
{
$this->config = array();
diff --git a/tests/upload/fileupload_test.php b/tests/upload/fileupload_test.php
index 84fc00bf98..ca9259d357 100644
--- a/tests/upload/fileupload_test.php
+++ b/tests/upload/fileupload_test.php
@@ -37,7 +37,7 @@ class phpbb_fileupload_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;
@@ -107,7 +107,7 @@ class phpbb_fileupload_test extends phpbb_test_case
return $filespec;
}
- protected function tearDown()
+ protected function tearDown(): void
{
// Clear globals
global $config, $user;
diff --git a/tests/upload/imagesize_test.php b/tests/upload/imagesize_test.php
index 5429bb5c5e..3adf61dedc 100644
--- a/tests/upload/imagesize_test.php
+++ b/tests/upload/imagesize_test.php
@@ -20,7 +20,7 @@ class phpbb_upload_imagesize_test extends \phpbb_test_case
/** @var string Path to fixtures */
protected $path;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
$this->imagesize = new \FastImageSize\FastImageSize();
diff --git a/tests/user/user_loader_test.php b/tests/user/user_loader_test.php
index f871f324ca..f283e993dc 100644
--- a/tests/user/user_loader_test.php
+++ b/tests/user/user_loader_test.php
@@ -21,7 +21,7 @@ class phpbb_user_loader_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/user_loader.xml');
}
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/version/version_fetch_test.php b/tests/version/version_fetch_test.php
index c44bd5514a..188b371c47 100644
--- a/tests/version/version_fetch_test.php
+++ b/tests/version/version_fetch_test.php
@@ -16,7 +16,7 @@
*/
class phpbb_version_helper_fetch_test extends phpbb_test_case
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/version/version_helper_remote_test.php b/tests/version/version_helper_remote_test.php
index 7b8d71181f..e15ff897b0 100644
--- a/tests/version/version_helper_remote_test.php
+++ b/tests/version/version_helper_remote_test.php
@@ -17,7 +17,7 @@ class version_helper_remote_test extends \phpbb_test_case
protected $cache;
protected $version_helper;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/version/version_test.php b/tests/version/version_test.php
index 2a0240f847..3298213487 100644
--- a/tests/version/version_test.php
+++ b/tests/version/version_test.php
@@ -13,7 +13,7 @@
class phpbb_version_helper_test extends phpbb_test_case
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/viewonline/helper_test.php b/tests/viewonline/helper_test.php
index 6540d33287..d7c9965ad1 100644
--- a/tests/viewonline/helper_test.php
+++ b/tests/viewonline/helper_test.php
@@ -13,7 +13,7 @@
class phpbb_viewonline_helper_test extends phpbb_test_case
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/tests/wrapper/phpbb_php_ini_test.php b/tests/wrapper/phpbb_php_ini_test.php
index 5827744702..d6ce11219f 100644
--- a/tests/wrapper/phpbb_php_ini_test.php
+++ b/tests/wrapper/phpbb_php_ini_test.php
@@ -18,7 +18,7 @@ class phpbb_wrapper_phpbb_php_ini_test extends phpbb_test_case
/** @var \phpbb_php_ini_fake php_ini */
protected $php_ini;
- public function setUp()
+ public function setUp(): void
{
$this->php_ini = new phpbb_php_ini_fake;
}
diff --git a/travis/phpunit-mariadb-travis.xml b/travis/phpunit-mariadb-travis.xml
index 4b85124783..35ade72d4e 100644
--- a/travis/phpunit-mariadb-travis.xml
+++ b/travis/phpunit-mariadb-travis.xml
@@ -7,8 +7,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="true"
- strict="true"
verbose="true"
bootstrap="../tests/bootstrap.php">
@@ -19,10 +17,10 @@
../tests/ui
- ../tests/functional
+ ../tests/functional
- ../tests/ui
+ ../tests/ui
diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml
deleted file mode 100644
index cccfc0aee8..0000000000
--- a/travis/phpunit-mysql-travis.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
- ../tests
- ../tests/functional
- ../tests/lint_test.php
- ../tests/ui
-
-
- ../tests/functional
-
-
- ../tests/ui
-
-
-
-
-
- slow
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/travis/phpunit-mysqli-travis.xml b/travis/phpunit-mysqli-travis.xml
index 4d649681b0..d2284086b9 100644
--- a/travis/phpunit-mysqli-travis.xml
+++ b/travis/phpunit-mysqli-travis.xml
@@ -7,8 +7,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="true"
- strict="true"
verbose="true"
bootstrap="../tests/bootstrap.php">
@@ -19,10 +17,10 @@
../tests/ui
- ../tests/functional
+ ../tests/functional
- ../tests/ui
+ ../tests/ui
diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml
index ae56da37f5..6faab4d61a 100644
--- a/travis/phpunit-postgres-travis.xml
+++ b/travis/phpunit-postgres-travis.xml
@@ -7,8 +7,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="true"
- strict="true"
verbose="true"
bootstrap="../tests/bootstrap.php">
@@ -19,10 +17,10 @@
../tests/ui
- ../tests/functional
+ ../tests/functional
- ../tests/ui
+ ../tests/ui
diff --git a/travis/phpunit-sqlite3-travis.xml b/travis/phpunit-sqlite3-travis.xml
index 8eabcc7243..633963c9fb 100644
--- a/travis/phpunit-sqlite3-travis.xml
+++ b/travis/phpunit-sqlite3-travis.xml
@@ -7,8 +7,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="true"
- strict="true"
verbose="true"
bootstrap="../tests/bootstrap.php">
@@ -19,10 +17,10 @@
../tests/ui
- ../tests/functional
+ ../tests/functional
- ../tests/ui
+ ../tests/ui
diff --git a/travis/setup-php-extensions.sh b/travis/setup-php-extensions.sh
index 918f67cd47..f6b12c421c 100755
--- a/travis/setup-php-extensions.sh
+++ b/travis/setup-php-extensions.sh
@@ -42,16 +42,9 @@ function install_php_extension
php_ini_file=$(find_php_ini)
-# apc
-if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.5.0-dev', '<');"` == "1" ]
-then
- echo 'Enabling APC PHP extension'
- printf "\n" | pecl install apc
- echo 'apc.enable_cli=1' >> "$php_ini_file"
-else
- echo 'Disabling Opcache'
- echo 'opcache.enable=0' >> "$php_ini_file"
-fi
+# Disable opcache for testing
+echo 'Disabling Opcache'
+echo 'opcache.enable=0' >> "$php_ini_file"
# APCu
if [ `php -r "echo (int) (version_compare(PHP_VERSION, '7.0.0-dev', '>=') && version_compare(PHP_VERSION, '7.3.0-dev', '<'));"` == "1" ]