This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +74
-8
lines changed
dev/tests/static/testsuite/Magento/Test/Legacy/_files Expand file tree Collapse file tree 7 files changed +74
-8
lines changed Original file line number Diff line number Diff line change 88use Magento \Framework \App \ObjectManager ;
99use Magento \Framework \App \Rss \DataProviderInterface ;
1010use Magento \Framework \Serialize \SerializerInterface ;
11+ use Zend \Feed \Writer \FeedFactory ;
1112
1213/**
1314 * Provides functionality to work with RSS feeds
@@ -92,7 +93,7 @@ public function setDataProvider(DataProviderInterface $dataProvider)
9293 */
9394 public function createRssXml ()
9495 {
95- $ rssFeedFromArray = \Zend_Feed:: importArray ($ this ->getFeeds (), ' rss ' );
96- return $ rssFeedFromArray -> saveXML ( );
96+ $ feed = FeedFactory:: factory ($ this ->getFeeds ());
97+ return $ feed -> export ( ' rss ' );
9798 }
9899}
Original file line number Diff line number Diff line change 66namespace Magento \Rss \Test \Unit \Controller \Adminhtml \Feed ;
77
88use Magento \Framework \TestFramework \Unit \Helper \ObjectManager as ObjectManagerHelper ;
9+ use Zend \Feed \Writer \Exception \InvalidArgumentException ;
910
1011/**
1112 * Class IndexTest
@@ -110,7 +111,7 @@ public function testExecuteWithException()
110111 $ this ->rssFactory ->expects ($ this ->once ())->method ('create ' )->will ($ this ->returnValue ($ rssModel ));
111112 $ this ->rssManager ->expects ($ this ->once ())->method ('getProvider ' )->will ($ this ->returnValue ($ dataProvider ));
112113
113- $ this ->expectException (' \Zend_Feed_Builder_Exception ' );
114+ $ this ->expectException (InvalidArgumentException::class );
114115 $ this ->controller ->execute ();
115116 }
116117}
Original file line number Diff line number Diff line change 66namespace Magento \Rss \Test \Unit \Controller \Feed ;
77
88use Magento \Framework \TestFramework \Unit \Helper \ObjectManager as ObjectManagerHelper ;
9+ use Zend \Feed \Writer \Exception \InvalidArgumentException ;
910
1011/**
1112 * Class IndexTest
@@ -97,7 +98,7 @@ public function testExecuteWithException()
9798 $ this ->rssFactory ->expects ($ this ->once ())->method ('create ' )->will ($ this ->returnValue ($ rssModel ));
9899 $ this ->rssManager ->expects ($ this ->once ())->method ('getProvider ' )->will ($ this ->returnValue ($ dataProvider ));
99100
100- $ this ->expectException (' \Zend_Feed_Builder_Exception ' );
101+ $ this ->expectException (InvalidArgumentException::class );
101102 $ this ->controller ->execute ();
102103 }
103104}
Original file line number Diff line number Diff line change @@ -119,11 +119,11 @@ public function testCreateRssXml()
119119 $ this ->rss ->setDataProvider ($ dataProvider );
120120 $ result = $ this ->rss ->createRssXml ();
121121 $ this ->assertContains ('<?xml version="1.0" encoding="UTF-8"?> ' , $ result );
122- $ this ->assertContains ('<title><![CDATA[ Feed Title]]> </title> ' , $ result );
123- $ this ->assertContains ('<title><![CDATA[ Feed 1 Title]]> </title> ' , $ result );
122+ $ this ->assertContains ('<title>Feed Title</title> ' , $ result );
123+ $ this ->assertContains ('<title>Feed 1 Title</title> ' , $ result );
124124 $ this ->assertContains ('<link>http://magento.com/rss/link</link> ' , $ result );
125125 $ this ->assertContains ('<link>http://magento.com/rss/link/id/1</link> ' , $ result );
126- $ this ->assertContains ('<description><![CDATA[ Feed Description]]> </description> ' , $ result );
126+ $ this ->assertContains ('<description>Feed Description</description> ' , $ result );
127127 $ this ->assertContains ('<description><![CDATA[Feed 1 Description]]></description> ' , $ result );
128128 }
129129}
Original file line number Diff line number Diff line change 5959 "zendframework/zend-db" : " ^2.8.2" ,
6060 "zendframework/zend-di" : " ^2.6.1" ,
6161 "zendframework/zend-eventmanager" : " ^2.6.3" ,
62+ "zendframework/zend-feed" : " ^2.9.0" ,
6263 "zendframework/zend-form" : " ^2.10.0" ,
6364 "zendframework/zend-http" : " ^2.6.0" ,
6465 "zendframework/zend-i18n" : " ^2.7.3" ,
Original file line number Diff line number Diff line change 42204220 ['Magento\Framework\MessageQueue\Config\Reader ' , 'Magento\Framework\MessageQueue\Config\Reader\Xml ' ],
42214221 ['Magento\Framework\MessageQueue\PublisherFactory ' ],
42224222 ['Magento\Framework\MessageQueue\PublisherProxy ' ],
4223+ ['Zend_Feed ' , 'Zend\Feed ' ],
42234224];
You can’t perform that action at this time.
0 commit comments