]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/LinkUtilsTest.php
Fixes #512: retrieving title didn't match the first closing tag
[github/shaarli/Shaarli.git] / tests / LinkUtilsTest.php
index c22575907c144e37dccfa6489731f1260d82347c..609a80cbe6b223f25b7060389f55e7ae807d26f3 100644 (file)
@@ -15,6 +15,8 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase
         $title = 'Read me please.';
         $html = '<html><meta>stuff</meta><title>'. $title .'</title></html>';
         $this->assertEquals($title, html_extract_title($html));
+        $html = '<html><title>'. $title .'</title>blabla<title>another</title></html>';
+        $this->assertEquals($title, html_extract_title($html));
     }
 
     /**