From 21cd4a1b4845858c3421dbd5f2673eceee421f5d Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 26 Nov 2020 08:43:03 +0000 Subject: psr-4 autoloading standard --- tests/unit/includes/FeedutilsTest.php | 89 ----------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 tests/unit/includes/FeedutilsTest.php (limited to 'tests/unit/includes/FeedutilsTest.php') diff --git a/tests/unit/includes/FeedutilsTest.php b/tests/unit/includes/FeedutilsTest.php deleted file mode 100644 index e9826a73d..000000000 --- a/tests/unit/includes/FeedutilsTest.php +++ /dev/null @@ -1,89 +0,0 @@ -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', - 'length' => 'length_value', - 'title' => 'title_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' - }*/ - - /** - * @uses ::xmlify - */ - public function test_atom_author() { - $this->assertEquals('', atom_author('', 'nick', 'name', 'uri', 72, 72, 'png', 'photourl')); - - $a = ' - uri - nick - uri - - - nick - name -'; - - $this->assertXmlStringEqualsXmlString($a, atom_author('tag', 'nick', 'name', 'uri', 72, 72, 'png', 'http://photourl')); - } - - /** - * @uses ::xmlify - */ - public function test_atom_render_author() { - $xchan = [ - 'xchan_addr' => 'chan@hub', - 'xchan_url' => 'http://hub', - 'xchan_name' => 'Chan', - 'xchan_photo_l' => 'http://hub/img', - 'xchan_photo_mimetype' => 'mimetype' - ]; - // There is no input validation in atom_render_author - //$this->assertEquals('', atom_render_author('', $xchan)); - - $a = ' - http://activitystrea.ms/schema/1.0/person - http://hub - chan - http://hub - - - - chan - Chan -'; - - $this->assertXmlStringEqualsXmlString($a, atom_render_author('tag', $xchan)); - } -} -- cgit v1.2.3