Code Duplication    Length = 5-5 lines in 3 locations

src/Kunstmaan/NodeBundle/Tests/unit/Helper/Menu/ActionsMenuBuilderTest.php 3 locations

@@ 105-109 (lines=5) @@
102
        $this->assertNotNull($menu->getChild('action.preview'));
103
        $this->assertNull($menu->getChild('action.save'));
104
105
        if (null !== $nodeTranslation->getNode()->getParent() || $nodeTranslation->getNode()->getChildren()->isEmpty()) {
106
            $this->assertNotNull($menu->getChild('action.delete'));
107
        } else {
108
            $this->assertNull($menu->getChild('action.delete'));
109
        }
110
111
        $this->assertEquals('page-main-actions js-auto-collapse-buttons', $menu->getChildrenAttribute('class'));
112
    }
@@ 132-136 (lines=5) @@
129
        $this->assertNotNull($menu->getChild('action.preview'));
130
        $this->assertNotNull($menu->getChild('action.publish'));
131
        $this->assertNull($menu->getChild('action.unpublish'));
132
        if (null !== $nodeTranslation->getNode()->getParent() || $nodeTranslation->getNode()->getChildren()->isEmpty()) {
133
            $this->assertNotNull($menu->getChild('action.delete'));
134
        } else {
135
            $this->assertNull($menu->getChild('action.delete'));
136
        }
137
138
        $nodeTranslation->setOnline(true);
139
        $menu = $this->builder->createActionsMenu();
@@ 146-150 (lines=5) @@
143
        $this->assertNotNull($menu->getChild('action.preview'));
144
        $this->assertNull($menu->getChild('action.publish'));
145
        $this->assertNotNull($menu->getChild('action.unpublish'));
146
        if (null !== $nodeTranslation->getNode()->getParent() || $nodeTranslation->getNode()->getChildren()->isEmpty()) {
147
            $this->assertNotNull($menu->getChild('action.delete'));
148
        } else {
149
            $this->assertNull($menu->getChild('action.delete'));
150
        }
151
152
        $this->assertEquals('page-main-actions js-auto-collapse-buttons', $menu->getChildrenAttribute('class'));
153
    }