mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 02:06:32 +02:00
[ticket/16649] Upgrade to Symfony 5
PHPBB3-16649
This commit is contained in:
5
tests/console/cache/purge_test.php
vendored
5
tests/console/cache/purge_test.php
vendored
@@ -28,6 +28,8 @@ class phpbb_console_command_cache_purge_test extends phpbb_test_case
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$this->cache_dir = dirname(__FILE__) . '/tmp/cache/';
|
||||
|
||||
if (file_exists($this->cache_dir))
|
||||
@@ -43,7 +45,8 @@ class phpbb_console_command_cache_purge_test extends phpbb_test_case
|
||||
$this->db = $this->createMock('\phpbb\db\driver\driver_interface');
|
||||
|
||||
$this->config = new \phpbb\config\config(array('assets_version' => 1));
|
||||
$this->user = $this->createMock('\phpbb\user');
|
||||
$this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
|
||||
$this->user = new \phpbb\user($this->language, '\phpbb\datetime');
|
||||
}
|
||||
|
||||
public function test_purge()
|
||||
|
@@ -50,7 +50,8 @@ class phpbb_console_command_thumbnail_test extends phpbb_database_test_case
|
||||
));
|
||||
|
||||
$this->db = $this->db = $this->new_dbal();
|
||||
$this->user = $this->createMock('\phpbb\user');
|
||||
$this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
|
||||
$this->user = new \phpbb\user($this->language, '\phpbb\datetime');
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->phpEx = $phpEx;
|
||||
|
||||
|
@@ -106,7 +106,7 @@ class phpbb_console_user_add_test extends phpbb_console_user_base
|
||||
|
||||
$this->assertEquals(2, $this->get_user_id('Admin'));
|
||||
|
||||
$this->question->setInputStream($this->getInputStream("bar\npassword\npassword\nbar@test.com\n"));
|
||||
$command_tester->setInputs(['bar\npassword\npassword\nbar@test.com']);
|
||||
|
||||
$command_tester->execute(array(
|
||||
'command' => $this->command_name,
|
||||
|
@@ -117,13 +117,4 @@ abstract class phpbb_console_user_base extends phpbb_database_test_case
|
||||
$user_id = $row ? $row['user_id'] : null;
|
||||
return $user_id;
|
||||
}
|
||||
|
||||
public function getInputStream($input)
|
||||
{
|
||||
$stream = fopen('php://memory', 'r+', false);
|
||||
fputs($stream, $input);
|
||||
rewind($stream);
|
||||
|
||||
return $stream;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user