From b1eb5d1d31e3ea256501c08a3ed9aa7183b27466 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 14 Apr 2016 17:59:37 +0200 Subject: Fixes #497: ignore case difference between tags While retrieving all tags, case differences will be ignored. This affects: * tag cloud * tag autocompletion --- tests/FeedBuilderTest.php | 2 +- tests/LinkDBTest.php | 6 ++++-- tests/utils/ReferenceLinkDB.php | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/FeedBuilderTest.php b/tests/FeedBuilderTest.php index 069b1581..647b2db2 100644 --- a/tests/FeedBuilderTest.php +++ b/tests/FeedBuilderTest.php @@ -93,7 +93,7 @@ class FeedBuilderTest extends PHPUnit_Framework_TestCase $this->assertContains('Permalink', $link['description']); $this->assertContains('http://host.tld/?WDWyig', $link['description']); $this->assertEquals(1, count($link['taglist'])); - $this->assertEquals('stuff', $link['taglist'][0]); + $this->assertEquals('sTuff', $link['taglist'][0]); // Test URL with external link. $this->assertEquals('https://static.fsf.org/nosvn/faif-2.0.pdf', $data['links']['20150310_114633']['url']); diff --git a/tests/LinkDBTest.php b/tests/LinkDBTest.php index 52d31400..8ffb1512 100644 --- a/tests/LinkDBTest.php +++ b/tests/LinkDBTest.php @@ -290,7 +290,9 @@ class LinkDBTest extends PHPUnit_Framework_TestCase 'stallman' => 1, 'free' => 1, '-exclude' => 1, - 'stuff' => 2, + // The DB contains a link with `sTuff` and another one with `stuff` tag. + // They need to be grouped with the first case found (`sTuff`). + 'sTuff' => 2, ), self::$publicLinkDB->allTags() ); @@ -310,7 +312,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase 'w3c' => 1, 'css' => 1, 'Mercurial' => 1, - 'stuff' => 2, + 'sTuff' => 2, '-exclude' => 1, '.hidden' => 1, ), diff --git a/tests/utils/ReferenceLinkDB.php b/tests/utils/ReferenceLinkDB.php index dc4f5dfa..46165b4d 100644 --- a/tests/utils/ReferenceLinkDB.php +++ b/tests/utils/ReferenceLinkDB.php @@ -21,7 +21,7 @@ class ReferenceLinkDB 'Stallman has a beard and is part of the Free Software Foundation (or not). Seriously, read this.', 0, '20150310_114651', - 'stuff' + 'sTuff' ); $this->addLink( -- cgit v1.2.3