@@ -65,9 +65,9 @@ class RssTest extends \PHPUnit_Framework_TestCase
6565 private $ cacheMock ;
6666
6767 /**
68- * @var \Magento\Framework\App\FeedImporterInterface |\PHPUnit_Framework_MockObject_MockObject
68+ * @var \Magento\Framework\App\FeedFactoryInterface |\PHPUnit_Framework_MockObject_MockObject
6969 */
70- private $ feedImporterMock ;
70+ private $ feedFactoryMock ;
7171
7272 /**
7373 * @var \Magento\Framework\App\FeedInterface|\PHPUnit_Framework_MockObject_MockObject
@@ -83,15 +83,15 @@ protected function setUp()
8383 {
8484 $ this ->cacheMock = $ this ->getMock (\Magento \Framework \App \CacheInterface::class);
8585 $ this ->serializerMock = $ this ->getMock (SerializerInterface::class);
86- $ this ->feedImporterMock = $ this ->getMock (\Magento \Framework \App \FeedImporterInterface ::class);
86+ $ this ->feedFactoryMock = $ this ->getMock (\Magento \Framework \App \FeedFactoryInterface ::class);
8787 $ this ->feedMock = $ this ->getMock (\Magento \Framework \App \FeedInterface::class);
8888
8989 $ this ->objectManagerHelper = new ObjectManagerHelper ($ this );
9090 $ this ->rss = $ this ->objectManagerHelper ->getObject (
9191 \Magento \Rss \Model \Rss::class,
9292 [
9393 'cache ' => $ this ->cacheMock ,
94- 'feedImporter ' => $ this ->feedImporterMock ,
94+ 'feedFactory ' => $ this ->feedFactoryMock ,
9595 'serializer ' => $ this ->serializerMock
9696 ]
9797 );
@@ -152,12 +152,13 @@ public function testCreateRssXml()
152152 $ dataProvider ->expects ($ this ->any ())->method ('getRssData ' )->will ($ this ->returnValue ($ this ->feedData ));
153153
154154 $ this ->feedMock ->expects ($ this ->once ())
155- ->method ('asXml ' )
155+ ->method ('getFormatedContentAs ' )
156+ ->with (\Magento \Framework \App \FeedOutputFormatsInterface::DEFAULT_FORMAT )
156157 ->will ($ this ->returnValue ($ this ->feedXml ));
157158
158- $ this ->feedImporterMock ->expects ($ this ->once ())
159+ $ this ->feedFactoryMock ->expects ($ this ->once ())
159160 ->method ('importArray ' )
160- ->with ($ this ->feedData )
161+ ->with ($ this ->feedData , \ Magento \ Framework \ App \FeedFormatsInterface:: DEFAULT_FORMAT )
161162 ->will ($ this ->returnValue ($ this ->feedMock ));
162163
163164 $ this ->rss ->setDataProvider ($ dataProvider );
0 commit comments