From 5211be59d081922afc97c06cdbb5e7c37b0672e8 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 23 Aug 2023 14:46:58 -0700 Subject: [PATCH] Fix tests Signed-off-by: Matt Friedman --- tests/acp/module_test.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/acp/module_test.php b/tests/acp/module_test.php index 49a0b195..39f47dc9 100644 --- a/tests/acp/module_test.php +++ b/tests/acp/module_test.php @@ -192,8 +192,14 @@ public function test_save_google_fonts($input, $expected, $error) $this->request->expects(self::at(6)) ->method('variable') - ->with('abbc3_google_fonts', '') - ->willReturn($input); + ->willReturnMap([ + ['abbc3_bbcode_bar', 0, false, \phpbb\request\request_interface::REQUEST, 0], + ['abbc3_qr_bbcodes', 0, false, \phpbb\request\request_interface::REQUEST, 0], + ['abbc3_auto_video', 0, false, \phpbb\request\request_interface::REQUEST, 0], + ['abbc3_icons_type', 'png', false, \phpbb\request\request_interface::REQUEST, 'png'], + ['abbc3_pipes', 0, false, \phpbb\request\request_interface::REQUEST, 0], + ['abbc3_google_fonts', '', false, \phpbb\request\request_interface::REQUEST, $input], + ]); // Throws Notice in PHP 8.0+ and Error in earlier versions $exceptionName = PHP_VERSION_ID < 80000 ? \PHPUnit\Framework\Error\Error::class : $error; @@ -217,7 +223,7 @@ public function test_info() /** * Mock check_form_key() - * Note: use the same namespace as the admin_input + * Note: use the same namespace as the controller * * @return bool */ @@ -228,7 +234,7 @@ function check_form_key() /** * Mock add_form_key() - * Note: use the same namespace as the admin_input + * Note: use the same namespace as the controller */ function add_form_key() {