File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 13
13
use Forensic \FeedParser \Feeds \ATOMFeed ;
14
14
use Forensic \FeedParser \Feeds \RSSFeed ;
15
15
use Forensic \FeedParser \Feeds \RDFFeed ;
16
+ use Forensic \FeedParser \ParameterBag ;
16
17
17
18
class ParserTest extends TestCase
18
19
{
@@ -174,4 +175,23 @@ public function testFeedItemNonExistingPropertyAccessibility()
174
175
);
175
176
$ this ->assertNull ($ feed ->items [0 ]->random );
176
177
}
178
+
179
+ /**
180
+ * test if feed returns paramater bag for array properties such as image
181
+ */
182
+ public function testIfFeedReturnsParameterBag ()
183
+ {
184
+ $ feed = $ this ->_parser ->parseFromFile (__DIR__ . '/Helpers/Feeds/rss.xml ' );
185
+ $ this ->assertInstanceOf (ParameterBag::class, $ feed ->image );
186
+ }
187
+
188
+ /**
189
+ * test if feed item returns paramater bag for array properties such as image
190
+ * and enclosure
191
+ */
192
+ public function testIfFeedItemReturnsParameterBag ()
193
+ {
194
+ $ feed = $ this ->_parser ->parseFromFile (__DIR__ . '/Helpers/Feeds/rss.xml ' );
195
+ $ this ->assertInstanceOf (ParameterBag::class, $ feed ->items [0 ]->enclosure );
196
+ }
177
197
}
You can’t perform that action at this time.
0 commit comments