Code Duplication    Length = 7-10 lines in 3 locations

src/OroCRM/Bundle/ChannelBundle/Tests/Unit/Entity/AbstractEntityTestCase.php 1 location

@@ 27-34 (lines=8) @@
24
     * @param mixed  $value
25
     * @param mixed  $expected
26
     */
27
    public function testSetGet($property, $value = null, $expected = null)
28
    {
29
        if ($value !== null) {
30
            call_user_func([$this->entity, 'set' . ucfirst($property)], $value);
31
        }
32
33
        $this->assertEquals($expected, call_user_func([$this->entity, 'get' . ucfirst($property)]));
34
    }
35
36
    public function testEmptyIdConstruction()
37
    {

src/OroCRM/Bundle/MagentoBundle/Tests/Unit/Service/MagentoUrlGeneratorTest.php 1 location

@@ 71-80 (lines=10) @@
68
     * @param mixed  $value
69
     * @param mixed  $expected
70
     */
71
    public function testSetGet($property, $value = null, $expected = null)
72
    {
73
        if ($value !== null) {
74
            call_user_func_array(array($this->urlGenerator, 'set' . ucfirst($property)), array($value));
75
        }
76
        $this->assertEquals(
77
            $expected,
78
            call_user_func_array(array($this->urlGenerator, 'get' . ucfirst($property)), array())
79
        );
80
    }
81
82
    /**
83
     * @return array

src/OroCRM/Bundle/SalesBundle/Tests/Unit/Entity/B2bCustomerTest.php 1 location

@@ 33-39 (lines=7) @@
30
    /**
31
     * @dataProvider getSetDataProvider
32
     */
33
    public function testGetSet($property, $value, $expected = null)
34
    {
35
        if (null !== $value) {
36
            call_user_func_array([$this->entity, 'set' . ucfirst($property)], [$value]);
37
        }
38
        $this->assertSame($expected, call_user_func([$this->entity, 'get' . ucfirst($property)]));
39
    }
40
41
    /**
42
     * @return array