Merge pull request from ArthurHoaro/enhance/tag-case

Fixes : ignore case difference between tags
This commit is contained in:
Arthur 2016-06-03 18:30:19 +02:00
commit 92a381f517
4 changed files with 15 additions and 6 deletions

View file

@ -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']);

View file

@ -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,
),

View file

@ -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(