#8020: link did not get an anchor in html mail
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 11 Mar 2013 12:35:57 +0000 (13:35 +0100)
committerCornelius Weiß <c.weiss@metaways.de>
Wed, 13 Mar 2013 09:24:41 +0000 (10:24 +0100)
- this should be already fixed with #8016
- added test

https://forge.tine20.org/mantisbt/view.php?id=8020

Change-Id: I63b2d807fc405ccbee418c7e8ff46e3f6841cc8d
Reviewed-on: https://gerrit.tine20.org/tine20/1723
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
Reviewed-by: Cornelius Weiß <c.weiss@metaways.de>
tests/tine20/Felamimail/Model/MessageTest.php

index 717c051..814863f 100644 (file)
@@ -102,4 +102,19 @@ class Felamimail_Model_MessageTest extends PHPUnit_Framework_TestCase
             . '<blockquote class="felamimail-body-blockquote"><blockquote class="felamimail-body-blockquote">lala<br />'
             . '</blockquote><br />xyz<br /></blockquote></blockquote><br /><br /><blockquote class="felamimail-body-blockquote">jojo<br /></blockquote>jojo<br />', $result);
     }
+    
+    /**
+     * testReplaceUris
+     * 
+     * @see 0008020: link did not get an anchor in html mail
+     */
+    public function testReplaceUris()
+    {
+        $message = new Felamimail_Model_Message(array(
+            'body'  =>  'http://www.facebook.com/media/set/?set=a.164136103742229.1073741825.100004375207149&type=1&l=692e495b17'
+        ));
+        
+        $result = Felamimail_Message::replaceUris($message->body);
+        $this->assertContains('a href=', $result);
+    }
 }