From bb6f4b2b5d0676ef0ed90f8050ad28e46f2dce35 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Fri, 25 Jan 2013 23:46:06 +0100 Subject: Refactored blockquote quotion routine in html2text conversion: it now correctly converts multiple and/or nested blockquotes --- tests/Framework/Html2text.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests') diff --git a/tests/Framework/Html2text.php b/tests/Framework/Html2text.php index 1d8963878..3e0df48d9 100644 --- a/tests/Framework/Html2text.php +++ b/tests/Framework/Html2text.php @@ -56,4 +56,23 @@ class rc_html2text extends PHPUnit_Framework_TestCase $this->assertEquals($out, $res, $title); } + + /** + * + */ + function test_multiple_blockquotes() + { + $html = <<Begin
OUTER BEGIN
INNER 1

Par 1
+
INNER 2

Par 2
+

Par 3

+
INNER 3
OUTER END
+EOF; + $ht = new rcube_html2text($html, false, false); + $res = $ht->get_text(); + + $this->assertContains('>> INNER 1', $res, 'Quote inner'); + $this->assertContains('>> INNER 3', $res, 'Quote inner'); + $this->assertContains('> OUTER END', $res, 'Quote outer'); + } } -- cgit v1.2.3