diff options
Diffstat (limited to 'tests/LinkDBTest.php')
-rw-r--r-- | tests/LinkDBTest.php | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/tests/LinkDBTest.php b/tests/LinkDBTest.php index 6fbf597a..25438277 100644 --- a/tests/LinkDBTest.php +++ b/tests/LinkDBTest.php | |||
@@ -101,7 +101,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase | |||
101 | * Attempt to instantiate a LinkDB whereas the datastore is not writable | 101 | * Attempt to instantiate a LinkDB whereas the datastore is not writable |
102 | * | 102 | * |
103 | * @expectedException IOException | 103 | * @expectedException IOException |
104 | * @expectedExceptionMessageRegExp /Error accessing\nnull/ | 104 | * @expectedExceptionMessageRegExp /Error accessing "null"/ |
105 | */ | 105 | */ |
106 | public function testConstructDatastoreNotWriteable() | 106 | public function testConstructDatastoreNotWriteable() |
107 | { | 107 | { |
@@ -297,7 +297,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase | |||
297 | 'sTuff' => 2, | 297 | 'sTuff' => 2, |
298 | 'ut' => 1, | 298 | 'ut' => 1, |
299 | ), | 299 | ), |
300 | self::$publicLinkDB->allTags() | 300 | self::$publicLinkDB->linksCountPerTag() |
301 | ); | 301 | ); |
302 | 302 | ||
303 | $this->assertEquals( | 303 | $this->assertEquals( |
@@ -325,7 +325,34 @@ class LinkDBTest extends PHPUnit_Framework_TestCase | |||
325 | 'tag4' => 1, | 325 | 'tag4' => 1, |
326 | 'ut' => 1, | 326 | 'ut' => 1, |
327 | ), | 327 | ), |
328 | self::$privateLinkDB->allTags() | 328 | self::$privateLinkDB->linksCountPerTag() |
329 | ); | ||
330 | $this->assertEquals( | ||
331 | array( | ||
332 | 'web' => 4, | ||
333 | 'cartoon' => 2, | ||
334 | 'gnu' => 1, | ||
335 | 'dev' => 1, | ||
336 | 'samba' => 1, | ||
337 | 'media' => 1, | ||
338 | 'html' => 1, | ||
339 | 'w3c' => 1, | ||
340 | 'css' => 1, | ||
341 | 'Mercurial' => 1, | ||
342 | '.hidden' => 1, | ||
343 | 'hashtag' => 1, | ||
344 | ), | ||
345 | self::$privateLinkDB->linksCountPerTag(['web']) | ||
346 | ); | ||
347 | $this->assertEquals( | ||
348 | array( | ||
349 | 'web' => 1, | ||
350 | 'html' => 1, | ||
351 | 'w3c' => 1, | ||
352 | 'css' => 1, | ||
353 | 'Mercurial' => 1, | ||
354 | ), | ||
355 | self::$privateLinkDB->linksCountPerTag(['web'], 'private') | ||
329 | ); | 356 | ); |
330 | } | 357 | } |
331 | 358 | ||