From e10ba35387c00ccffdb734e922cddfe4622e4614 Mon Sep 17 00:00:00 2001 From: Thomas Negre Date: Wed, 23 Nov 2022 12:01:21 +0100 Subject: [PATCH] Add test case to lock/explain behavior on

heading tags. --- test/phpunit/ODFTest.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/phpunit/ODFTest.php b/test/phpunit/ODFTest.php index 5bcd9a72290..90b505e0848 100644 --- a/test/phpunit/ODFTest.php +++ b/test/phpunit/ODFTest.php @@ -335,6 +335,9 @@ class ODFTest extends PHPUnit\Framework\TestCase // 'expected' => "123 trucmachin > truc < troc > tracbla bla'", // ], + /* Tests that can evolve */ + // Following tests reflect the current behavior. They may evolve if the method behavior changes. + // The method removes hyperlinks and tags that are not dealt with. 29 => [ 'to_convert' => '123 trucmachin > truc < troc > tracbla bla', @@ -342,9 +345,14 @@ class ODFTest extends PHPUnit\Framework\TestCase 'charset' => null, 'expected' => "123 trucmachin > truc < troc > tracbla bla", ], - - // HTML should not take \n into account, but only
. 30 => [ + 'to_convert' => '123

Title

bla', + 'encode' => true, + 'charset' => null, + 'expected' => "123 Title bla", + ], + // HTML should not take \n into account, but only
. + 31 => [ 'to_convert' => "text with strong text , a line\nbreak and underlined words with it@lic sp&ciàlchärs éè l'", 'encode' => false, 'charset' => 'UTF-8',