Code Duplication    Length = 9-13 lines in 3 locations

src/Sylius/Component/Order/spec/Model/OrderItemSpec.php 1 location

@@ 186-194 (lines=9) @@
183
        $this->setUnitPrice(100);
184
    }
185
186
    function it_adds_adjustments_properly(AdjustmentInterface $adjustment)
187
    {
188
        $adjustment->isNeutral()->willReturn(true);
189
        $adjustment->setAdjustable($this)->shouldBeCalled();
190
191
        $this->hasAdjustment($adjustment)->shouldReturn(false);
192
        $this->addAdjustment($adjustment);
193
        $this->hasAdjustment($adjustment)->shouldReturn(true);
194
    }
195
196
    function it_removes_adjustments_properly(AdjustmentInterface $adjustment)
197
    {

src/Sylius/Component/Order/spec/Model/OrderSpec.php 2 locations

@@ 177-185 (lines=9) @@
174
        $this->getAdjustments()->shouldHaveType('Doctrine\Common\Collections\Collection');
175
    }
176
177
    function it_adds_adjustments_properly(AdjustmentInterface $adjustment)
178
    {
179
        $adjustment->setAdjustable($this)->shouldBeCalled();
180
        $adjustment->isNeutral()->willReturn(true);
181
182
        $this->hasAdjustment($adjustment)->shouldReturn(false);
183
        $this->addAdjustment($adjustment);
184
        $this->hasAdjustment($adjustment)->shouldReturn(true);
185
    }
186
187
    function it_removes_adjustments_properly(AdjustmentInterface $adjustment)
188
    {
@@ 204-216 (lines=13) @@
201
        $this->hasAdjustment($adjustment)->shouldReturn(false);
202
    }
203
204
    function it_removes_adjustments_recursively_properly(
205
        AdjustmentInterface $orderAdjustment,
206
        OrderItemInterface $item
207
    ) {
208
        $this->addAdjustment($orderAdjustment);
209
        $this->addItem($item);
210
211
        $item->removeAdjustmentsRecursively(null)->shouldBeCalled();
212
213
        $this->removeAdjustmentsRecursively();
214
215
        $this->hasAdjustment($orderAdjustment)->shouldReturn(false);
216
    }
217
218
    function it_removes_adjustments_recursively_by_type_properly(
219
        AdjustmentInterface $orderPromotionAdjustment,