mirror of
https://github.com/friendica/friendica
synced 2024-12-23 04:40:15 +00:00
Added tests
This commit is contained in:
parent
d2702dfe9c
commit
b948b2c7cb
1 changed files with 17 additions and 0 deletions
|
@ -214,4 +214,21 @@ class StringsTest extends TestCase
|
||||||
|
|
||||||
self::assertEquals($originalText, $text);
|
self::assertEquals($originalText, $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testCleanTags()
|
||||||
|
{
|
||||||
|
$rawTags = 'Open, #Source, Friendica Software; Federation #Fediverse';
|
||||||
|
$cleaned = 'federation,fediverse,friendica,open,software,source';
|
||||||
|
|
||||||
|
self::assertEquals($cleaned, Strings::cleanTags($rawTags));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testgetTagArrayByString()
|
||||||
|
{
|
||||||
|
$list = 'Open, #Source, Friendica Software; Federation #Fediverse';
|
||||||
|
$tags = ['federation', 'fediverse', 'friendica', 'open', 'software', 'source'];
|
||||||
|
|
||||||
|
self::assertEquals($tags, Strings::getTagArrayByString($list));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue