@@ -414,4 +414,36 @@ public function testAscraeus() {
414414 $ this ->assertEquals (20 , count ($ data ->items ));
415415 }
416416
417+ public function testAdactioLinks () {
418+ $ url = 'http://feed.example.com/adactio-links ' ;
419+ $ response = $ this ->parse (['url ' => $ url , 'expect ' => 'feed ' ]);
420+
421+ $ body = $ response ->getContent ();
422+ $ this ->assertEquals (200 , $ response ->getStatusCode ());
423+ $ data = json_decode ($ body )->data ;
424+
425+ $ this ->assertEquals ('feed ' , $ data ->type );
426+ // 20 h-entrys followed by one h-card, which should have been removed and used as the author instead
427+ $ this ->assertEquals (20 , count ($ data ->items ));
428+ $ this ->assertEquals ('http://feed.example.com/links/14501 ' , $ data ->items [0 ]->url );
429+ $ this ->assertEquals ('http://feed.example.com/links/14445 ' , $ data ->items [19 ]->url );
430+ $ item = $ data ->items [0 ];
431+ $ this ->assertEquals ('Jeremy Keith ' , $ item ->author ->name );
432+ $ this ->assertEquals ('https://adactio.com/ ' , $ item ->author ->url );
433+ }
434+
435+ public function testWaterpigsFeed () {
436+ $ url = 'http://feed.example.com/waterpigs ' ;
437+ $ response = $ this ->parse (['url ' => $ url , 'expect ' => 'feed ' ]);
438+
439+ $ body = $ response ->getContent ();
440+ $ this ->assertEquals (200 , $ response ->getStatusCode ());
441+ $ data = json_decode ($ body )->data ;
442+
443+ $ this ->assertEquals ('feed ' , $ data ->type );
444+ $ this ->assertEquals (21 , count ($ data ->items ));
445+ $ item = $ data ->items [16 ];
446+ $ this ->assertEquals ('Barnaby Walters ' , $ item ->author ->name );
447+ $ this ->assertEquals ('https://waterpigs.co.uk ' , $ item ->author ->url );
448+ }
417449}
0 commit comments