Eko\FeedBundle\Tests\Formatter\RSSFormatterTest::testAddCustomGroupChannelFieldWithItemInterface PHP Method

testAddCustomGroupChannelFieldWithItemInterface() public method

Check if a custom group channel field is properly rendered with GroupFieldInterface.
    public function testAddCustomGroupChannelFieldWithItemInterface()
    {
        $feed = $this->manager->get('article');
        $feed->add(new FakeItemInterfaceEntity());
        $feed->addChannelField(new GroupChannelField('image', [new ChannelField('name', 'My test image'), new ChannelField('url', 'http://www.example.com/image.jpg')]));
        $output = $feed->render('rss');
        $this->assertContains('<image>', $output);
        $this->assertContains('<name>My test image</name>', $output);
        $this->assertContains('<url>http://www.example.com/image.jpg</url>', $output);
        $this->assertContains('</image>', $output);
    }