From 92cd7f34b07e86062f2c024039e3309768b48ce6 Mon Sep 17 00:00:00 2001
From: Andy Wermke <andy@dev.next-step-software.com>
Date: Thu, 04 Apr 2013 10:10:23 -0400
Subject: [PATCH] Merge branch 'master' of https://github.com/roundcube/roundcubemail

---
 tests/Framework/Html2text.php |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/tests/HtmlToText.php b/tests/Framework/Html2text.php
similarity index 62%
rename from tests/HtmlToText.php
rename to tests/Framework/Html2text.php
index b90c61a..3e0df48 100644
--- a/tests/HtmlToText.php
+++ b/tests/Framework/Html2text.php
@@ -1,11 +1,11 @@
 <?php
 
 /**
- * Test class to test html2text class
+ * Test class to test rcube_html2text class
  *
  * @package Tests
  */
-class HtmlToText extends PHPUnit_Framework_TestCase
+class rc_html2text extends PHPUnit_Framework_TestCase
 {
 
     function data_html2text()
@@ -49,11 +49,30 @@
      */
     function test_html2text($title, $in, $out)
     {
-        $ht = new html2text(null, false, false);
+        $ht = new rcube_html2text(null, false, false);
 
         $ht->set_html($in);
         $res = $ht->get_text();
 
         $this->assertEquals($out, $res, $title);
     }
+
+    /**
+     *
+     */
+    function test_multiple_blockquotes()
+    {
+        $html = <<<EOF
+<br>Begin<br><blockquote>OUTER BEGIN<blockquote>INNER 1<br></blockquote><div><br></div><div>Par 1</div>
+<blockquote>INNER 2</blockquote><div><br></div><div>Par 2</div>
+<div><br></div><div>Par 3</div><div><br></div>
+<blockquote>INNER 3</blockquote>OUTER END</blockquote>
+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');
+    }
 }

--
Gitblit v1.9.1