1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-14 12:44:06 +02:00

[ticket/16346] Fix method arguments

PHPBB3-16346
This commit is contained in:
rubencm
2020-08-14 18:42:50 +00:00
parent 758c28ca69
commit 490ddbc2cd
46 changed files with 78 additions and 144 deletions

View File

@@ -24,12 +24,7 @@ class phpbb_profilefield_type_date_test extends phpbb_test_case
*/
protected function setUp(): void
{
global $phpbb_root_path, $phpEx;
$this->user = $this->createMock('\phpbb\user', array(), array(
new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
'\phpbb\datetime'
));
$this->user = $this->createMock('\phpbb\user');
$this->user->expects($this->any())
->method('lang')
->will($this->returnCallback(array($this, 'return_callback_implode')));

View File

@@ -23,12 +23,7 @@ class phpbb_profilefield_type_int_test extends phpbb_test_case
*/
protected function setUp(): void
{
global $phpbb_root_path, $phpEx;
$user = $this->createMock('\phpbb\user', array(), array(
new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
'\phpbb\datetime'
));
$user = $this->createMock('\phpbb\user');
$user->expects($this->any())
->method('lang')
->will($this->returnCallback(array($this, 'return_callback_implode')));

View File

@@ -19,16 +19,13 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case
/**
* Sets up basic test objects
*
* @access protected
* @access protected
*/
protected function setUp(): void
{
global $config, $request, $user, $cache, $phpbb_root_path, $phpEx;
global $config, $request, $user, $cache;
$user = $this->createMock('\phpbb\user', array(), array(
new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
'\phpbb\datetime'
));
$user = $this->createMock('\phpbb\user');
$cache = new phpbb_mock_cache;
$user->expects($this->any())
->method('lang')

View File

@@ -27,14 +27,11 @@ class phpbb_profilefield_type_url_test extends phpbb_test_case
*/
protected function setUp(): void
{
global $config, $request, $user, $cache, $phpbb_root_path, $phpEx;
global $config, $request, $user, $cache;
$config = new \phpbb\config\config([]);
$cache = new phpbb_mock_cache;
$user = $this->createMock('\phpbb\user', array(), array(
new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
'\phpbb\datetime'
));
$user = $this->createMock('\phpbb\user');
$user->expects($this->any())
->method('lang')
->will($this->returnCallback(array($this, 'return_callback_implode')));