From d1be77246874ac0ff70c1100acbd422025cb9a23 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 20 Jul 2020 20:06:04 -0500 Subject: [PATCH] fixes --- src/Feed/Rss/Channel.php | 17 +++++++++-------- tests/UIKit/SocialMetaTest.php | 5 ++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Feed/Rss/Channel.php b/src/Feed/Rss/Channel.php index 43567f4..97309f0 100644 --- a/src/Feed/Rss/Channel.php +++ b/src/Feed/Rss/Channel.php @@ -10,14 +10,13 @@ class Channel extends Element { - // private $xmlVersion = "1.0"; + private $xmlVersion = "1.0"; private $rssVersion = "2.0"; private $title = ""; private $link = ""; private $description = ""; - // private $content = []; - // private $otherChannelMeta = []; + private $otherChannelMeta = []; private $language = ""; @@ -69,15 +68,17 @@ public function unfold(): string Element::description($this->description) ]); - // Shoop::dictionary($this->otherChannelMeta)->each( - // function($value, $element) use (&$content) { - // $content = $content->plus(Element::fold($element, $value)); - // }); + Shoop::dictionary($this->otherChannelMeta)->each( + function($value, $element) use (&$content) { + $content = $content->plus(Element::fold($element, $value)); + }); + + $content = $content->plus(...$this->content); return Shoop::string( Element::rss( Element::channel( - ...Shoop::array($this->content) + ...Shoop::array($content) ->each(function($item) { return $item->unfold(); }) diff --git a/tests/UIKit/SocialMetaTest.php b/tests/UIKit/SocialMetaTest.php index 3d7c17d..169dcb3 100755 --- a/tests/UIKit/SocialMetaTest.php +++ b/tests/UIKit/SocialMetaTest.php @@ -12,7 +12,6 @@ public function testFacebook() { $expected = ''; $actual = UIKit::socialMeta( - "website", "Hello, World!", "https://8fold.pro", "A short description. LinkedIn would like to have 100+ characters." @@ -21,11 +20,11 @@ public function testFacebook() $expected = ''; $actual = UIKit::socialMeta( - "website", "Hello, World!", "https://8fold.pro", "A short description. LinkedIn would like to have 100+ characters.", "https://8fold.pro/assets/ui/logo.svg", + "website", "ABCDEFGHIJKLMNOP" ); $this->assertEquals($expected, $actual->unfold()); @@ -35,11 +34,11 @@ public function testTwitter() { $expected = ''; $actual = UIKit::socialMeta( - "website", "Hello, World!", "https://8fold.pro", "A short description. LinkedIn would like to have 100+ characters.", "https://8fold.pro/assets/ui/logo.svg", + "website", "ABCDEFGHIJKLMNOP" )->twitter(); $this->assertEquals($expected, $actual->unfold());