From 73006ccdf57c36945ddaa2a15a0a40c005f07569 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 23 Oct 2024 14:31:21 +0200 Subject: tests: Tests for BBCode cleanup fix Somehow I forgot to include this in the patch that fixed the issue. --- tests/unit/CleanupBBCodeTest.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/unit/CleanupBBCodeTest.php diff --git a/tests/unit/CleanupBBCodeTest.php b/tests/unit/CleanupBBCodeTest.php new file mode 100644 index 000000000..8e19b1d7e --- /dev/null +++ b/tests/unit/CleanupBBCodeTest.php @@ -0,0 +1,27 @@ +assertEquals($expected, cleanup_bbcode($input)); + } + + public static function cleanup_bbcode_provider(): array { + return [ + 'url followed by newline' => [ + "#^[url=https://example.com]https://example.com[/url]\na test link", + "https://example.com\na test link", + ] + ]; + } +} -- cgit v1.2.3