[ticket/16955] Update tests to support small changes to docblocks/types

PHPBB3-16955
This commit is contained in:
Marc Alexander 2022-12-26 14:57:11 +01:00
parent 1c02b1a7b5
commit d3d53cda0f
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
4 changed files with 11 additions and 21 deletions

View file

@ -28,26 +28,26 @@ class test extends \phpbb\notification\type\base
return 'test';
}
public static function get_item_id($post)
public static function get_item_id($type_data)
{
return (int) $post['post_id'];
return (int) $type_data['post_id'];
}
public static function get_item_parent_id($post)
public static function get_item_parent_id($type_data)
{
return (int) $post['topic_id'];
return (int) $type_data['topic_id'];
}
public function find_users_for_notification($post, $options = array())
public function find_users_for_notification($type_data, $options = array())
{
return $this->check_user_notification_options(array(0), $options);
}
public function create_insert_array($post, $pre_create_data = array())
public function create_insert_array($type_data, $pre_create_data = array())
{
$this->notification_time = $post['post_time'];
$this->notification_time = $type_data['post_time'];
parent::create_insert_array($post, $pre_create_data);
parent::create_insert_array($type_data, $pre_create_data);
}
public function create_update_array($type_data)

View file

@ -120,21 +120,11 @@ class phpbb_template_template_test_case extends phpbb_test_case
// Test the engine can be used
$this->setup_engine();
$this->template->clear_cache();
global $phpbb_filesystem;
$phpbb_filesystem = new \phpbb\filesystem\filesystem();
}
protected function tearDown(): void
{
if ($this->template)
{
$this->template->clear_cache();
}
}
protected function run_template($file, array $vars, array $block_vars, array $destroy, $expected, $lang_vars = array())
{
$this->template->set_filenames(array('test' => $file));

View file

@ -271,7 +271,7 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
$log = $this->getMockBuilder('phpbb\\log\\log_interface')->getMock();
$log->expects($this->once())
->method('add')
->with('critical', null, null, 'LOG_BBCODE_CONFIGURATION_ERROR', false, ['[x !x]{TEXT}[/x]', 'Cannot interpret the BBCode definition']);
->with('critical', ANONYMOUS, '', 'LOG_BBCODE_CONFIGURATION_ERROR', false, ['[x !x]{TEXT}[/x]', 'Cannot interpret the BBCode definition']);
$container = new phpbb_mock_container_builder;
$container->set('log', $log);

View file

@ -437,8 +437,8 @@ class phpbb_textformatter_s9e_renderer_test extends phpbb_test_case
{
return isset($vars['renderer'])
&& $vars['renderer'] instanceof \phpbb\textformatter\s9e\renderer
&& isset($vars['xml'])
&& $vars['xml'] === '<t>...</t>';
&& isset($vars['text'])
&& $vars['text'] === '<t>...</t>';
}
public function render_after_event_callback($vars)