Eko\FeedBundle\Tests\Formatter\AtomFormatterTest::testAddCustomGroupItemFieldWithAttributes PHP Method

testAddCustomGroupItemFieldWithAttributes() public method

Check if a custom group item field with attributes is properly rendered.
    public function testAddCustomGroupItemFieldWithAttributes()
    {
        $feed = $this->manager->get('article');
        $feed->add(new FakeItemInterfaceEntity());
        $feed->addItemField(new GroupItemField('categories', new ItemField('category', 'getFeedCategoriesCustom', [], ['category-type' => 'test']), ['is-it-test' => 'yes']));
        $output = $feed->render('atom');
        $this->assertContains('<categories is-it-test="yes">', $output);
        $this->assertContains('<category category-type="test">category 1</category>', $output);
        $this->assertContains('<category category-type="test">category 2</category>', $output);
        $this->assertContains('<category category-type="test">category 3</category>', $output);
        $this->assertContains('</categories>', $output);
    }