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

testAddCustomGroupChannelFieldWithAttributes() public method

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