assertEquals($expected, html2bbcode($src)); } private function html2bbcode_provider(): array { return [ 'paragraph over multiple lines' => [ "

A paragraph over\nmultiple lines\nshould be unwrapped

", 'A paragraph over multiple lines should be unwrapped' ], 'image with alt text' => [ 'Alt text', '[img=https://example.com/image.jpg]Alt text[/img]' ], 'code block' => [ "
some\ncode
", "[code]some\ncode[/code]" ], 'code block with indentation' => [ "
some\n    indented\ncode
", "[code]some\n indented\ncode[/code]" ], 'paragraph with a mention and some text' => [ '

@profile some content

', '[url=https://example.org/@profile]@profile[/url] some content' ] ]; } }