Code Duplication    Length = 13-17 lines in 2 locations

src/Oro/Bundle/ActionBundle/Tests/Unit/Model/ActionGroupTest.php 1 location

@@ 233-245 (lines=13) @@
230
     * @param bool $returnValue
231
     * @return ConfigurableCondition|\PHPUnit_Framework_MockObject_MockObject
232
     */
233
    protected function createCondition(
234
        \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expects,
235
        ActionData $data,
236
        $returnValue
237
    ) {
238
        /* @var $condition ConfigurableCondition|\PHPUnit_Framework_MockObject_MockObject */
239
        $condition = $this->getMockBuilder('Oro\Component\Action\Condition\Configurable')
240
            ->disableOriginalConstructor()
241
            ->getMock();
242
        $condition->expects($expects)->method('evaluate')->with($data)->willReturn($returnValue);
243
244
        return $condition;
245
    }
246
}
247

src/Oro/Bundle/ActionBundle/Tests/Unit/Model/OperationTest.php 1 location

@@ 539-555 (lines=17) @@
536
     * @param bool $returnValue
537
     * @return ConfigurableCondition|\PHPUnit_Framework_MockObject_MockObject
538
     */
539
    protected function createCondition(
540
        \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expects,
541
        ActionData $data,
542
        $returnValue
543
    ) {
544
        /* @var $condition ConfigurableCondition|\PHPUnit_Framework_MockObject_MockObject */
545
        $condition = $this->getMockBuilder('Oro\Component\Action\Condition\Configurable')
546
            ->disableOriginalConstructor()
547
            ->getMock();
548
549
        $condition->expects($expects)
550
            ->method('evaluate')
551
            ->with($data)
552
            ->willReturn($returnValue);
553
554
        return $condition;
555
    }
556
557
    public function testGetAttributeManager()
558
    {