diff options
Diffstat (limited to 'tests/LinkUtilsTest.php')
-rw-r--r-- | tests/LinkUtilsTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/LinkUtilsTest.php b/tests/LinkUtilsTest.php index c2257590..d1b022fd 100644 --- a/tests/LinkUtilsTest.php +++ b/tests/LinkUtilsTest.php | |||
@@ -15,6 +15,8 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase | |||
15 | $title = 'Read me please.'; | 15 | $title = 'Read me please.'; |
16 | $html = '<html><meta>stuff</meta><title>'. $title .'</title></html>'; | 16 | $html = '<html><meta>stuff</meta><title>'. $title .'</title></html>'; |
17 | $this->assertEquals($title, html_extract_title($html)); | 17 | $this->assertEquals($title, html_extract_title($html)); |
18 | $html = '<html><title>'. $title .'</title>blabla<title>another</title></html>'; | ||
19 | $this->assertEquals($title, html_extract_title($html)); | ||
18 | } | 20 | } |
19 | 21 | ||
20 | /** | 22 | /** |
@@ -82,4 +84,13 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase | |||
82 | $html = '<html><meta>stuff</meta><meta charset=""/></html>'; | 84 | $html = '<html><meta>stuff</meta><meta charset=""/></html>'; |
83 | $this->assertFalse(html_extract_charset($html)); | 85 | $this->assertFalse(html_extract_charset($html)); |
84 | } | 86 | } |
87 | |||
88 | /** | ||
89 | * Test count_private. | ||
90 | */ | ||
91 | public function testCountPrivateLinks() | ||
92 | { | ||
93 | $refDB = new ReferenceLinkDB(); | ||
94 | $this->assertEquals($refDB->countPrivateLinks(), count_private($refDB->getLinks())); | ||
95 | } | ||
85 | } | 96 | } |