Code Duplication    Length = 13-15 lines in 2 locations

src/SumoCoders/FrameworkCoreBundle/Tests/BreadCrumb/BreadCrumbBuilderTest.php 1 location

@@ 38-50 (lines=13) @@
35
    /**
36
     * @return \PHPUnit_Framework_MockObject_MockObject
37
     */
38
    protected function getFactory($item)
39
    {
40
        /** @var \PHPUnit_Framework_MockObject_MockBuilder $factory */
41
        $factory = $this->getMockBuilder(FactoryInterface::class)->getMock();
42
        $factory->method('createItem')
43
            ->will(
44
                $this->returnValue(
45
                    $item
46
                )
47
            );
48
49
        return $factory;
50
    }
51
52
    protected function createSimpleBreadCrumb()
53
    {

src/SumoCoders/FrameworkCoreBundle/Tests/Menu/MenuBuilderTest.php 1 location

@@ 53-67 (lines=15) @@
50
    /**
51
     * @return \PHPUnit_Framework_MockObject_MockObject
52
     */
53
    protected function getFactory()
54
    {
55
        $item = $this->getItem();
56
57
        /** @var \PHPUnit_Framework_MockObject_MockBuilder $factory */
58
        $factory = $this->getMockBuilder(FactoryInterface::class)->getMock();
59
        $factory->method('createItem')
60
            ->will(
61
                $this->returnValue(
62
                    $item
63
                )
64
            );
65
66
        return $factory;
67
    }
68
69
    /**
70
     * Test the getters and setters