diff options
author | git-marijus <mario@mariovavti.com> | 2017-11-04 10:18:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-04 10:18:34 +0100 |
commit | 39c194c5c32e49f461b8b42a3f4e411a3a5cde3c (patch) | |
tree | 8ca92c3e6e31166920b02913e89d580025bf6edf /tests/unit/includes/FeedutilsText.php | |
parent | 9dfb471c0bbf2978e528689f6c0885ff9abddc7d (diff) | |
parent | 1be98d7b7fea30a929d27e7aa0b1412da3276b2c (diff) | |
download | volse-hubzilla-39c194c5c32e49f461b8b42a3f4e411a3a5cde3c.tar.gz volse-hubzilla-39c194c5c32e49f461b8b42a3f4e411a3a5cde3c.tar.bz2 volse-hubzilla-39c194c5c32e49f461b8b42a3f4e411a3a5cde3c.zip |
Merge pull request #891 from dawnbreak/langlibs
Langlibs updates
Diffstat (limited to 'tests/unit/includes/FeedutilsText.php')
-rw-r--r-- | tests/unit/includes/FeedutilsText.php | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/tests/unit/includes/FeedutilsText.php b/tests/unit/includes/FeedutilsText.php deleted file mode 100644 index 932a1b3a1..000000000 --- a/tests/unit/includes/FeedutilsText.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -namespace Zotlabs\Tests\Unit\includes; - -use Zotlabs\Tests\Unit\UnitTestCase; - -/** - * @brief Unit Test case for include/feedutils.php file. - */ -class FeedutilsTest extends UnitTestCase { - - public function test_normalise_id() { - $this->assertEquals('id', normalise_id('id')); - $this->assertEquals('id', normalise_id('X-ZOT:id')); - $this->assertEquals('id id2', normalise_id('X-ZOT:id X-ZOT:id2')); - $this->assertEmpty(normalise_id('')); - } - - public function test_encode_rel_links() { - // invalid params return empty array - $this->assertEquals([], encode_rel_links('string')); - $this->assertEquals([], encode_rel_links([])); - - $b = ['attribs' => ['' => [ - 'rel' => 'rel_value', - 'type' => 'type_value', - 'href' => 'href_value' - ]]]; - $blink1 = ['link1' => $b]; - $bresult[] = $b['attribs']['']; - $this->assertEquals($bresult, encode_rel_links($blink1)); - } - -/* public function test_encode_rel_links_fail() { - $a = [ 'key' => 'value']; - $this->assertFalse(encode_rel_links($a)); - //Illegal string offset 'attribs' - }*/ - - public function test_atom_author() { - $this->assertEquals('', atom_author('', 'nick', 'name', 'uri', 72, 72, 'png', 'photourl')); - - $a = '<tag> - <id>uri</id> - <name>nick</name> - <uri>uri</uri> - <link rel="photo" type="png" media:width="72" media:height="72" href="http://photourl" /> - <link rel="avatar" type="png" media:width="72" media:height="72" href="http://photourl" /> - <poco:preferredUsername>nick</poco:preferredUsername> - <poco:displayName>name<poco:displayName> -</tag>'; - - $this->assertXmlStringEqualsXmlString($a, atom_author('tag', 'nick', 'name', 'uri', 72, 72, 'png', 'http://photourl')); - } -} |