Code Duplication    Length = 10-10 lines in 6 locations

Tests/Gimme/Context/ContextTest.php 1 location

@@ 68-77 (lines=10) @@
65
        self::assertTrue($this->context->isSupported(new Article()));
66
    }
67
68
    protected function tearDown()
69
    {
70
        $reflection = new \ReflectionObject($this);
71
        foreach ($reflection->getProperties() as $prop) {
72
            if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {
73
                $prop->setAccessible(true);
74
                $prop->setValue($this, null);
75
            }
76
        }
77
    }
78
}
79

Tests/Gimme/Loader/ArticleLoaderTest.php 1 location

@@ 36-45 (lines=10) @@
33
        self::assertCount(2, $result);
34
    }
35
36
    protected function tearDown()
37
    {
38
        $reflection = new \ReflectionObject($this);
39
        foreach ($reflection->getProperties() as $prop) {
40
            if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {
41
                $prop->setAccessible(true);
42
                $prop->setValue($this, null);
43
            }
44
        }
45
    }
46
}
47

Tests/Gimme/Widget/HtmlWidgetTest.php 1 location

@@ 43-52 (lines=10) @@
40
        $this->assertEquals($this->widget->render(), 'simple html body');
41
    }
42
43
    protected function tearDown()
44
    {
45
        $reflection = new \ReflectionObject($this);
46
        foreach ($reflection->getProperties() as $prop) {
47
            if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {
48
                $prop->setAccessible(true);
49
                $prop->setValue($this, null);
50
            }
51
        }
52
    }
53
}
54

Tests/Twig/Node/ContainerNodeTest.php 1 location

@@ 100-109 (lines=10) @@
97
        ];
98
    }
99
100
    protected function tearDown()
101
    {
102
        $reflection = new \ReflectionObject($this);
103
        foreach ($reflection->getProperties() as $prop) {
104
            if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {
105
                $prop->setAccessible(true);
106
                $prop->setValue($this, null);
107
            }
108
        }
109
    }
110
}
111

Tests/Twig/Node/GimmeListNodeTest.php 1 location

@@ 304-313 (lines=10) @@
301
            ], ];
302
    }
303
304
    protected function tearDown()
305
    {
306
        $reflection = new \ReflectionObject($this);
307
        foreach ($reflection->getProperties() as $prop) {
308
            if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {
309
                $prop->setAccessible(true);
310
                $prop->setValue($this, null);
311
            }
312
        }
313
    }
314
}
315

Tests/Twig/Node/GimmeNodeTest.php 1 location

@@ 119-128 (lines=10) @@
116
        $twig->render('error_gimme');
117
    }
118
119
    protected function tearDown()
120
    {
121
        $reflection = new \ReflectionObject($this);
122
        foreach ($reflection->getProperties() as $prop) {
123
            if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {
124
                $prop->setAccessible(true);
125
                $prop->setValue($this, null);
126
            }
127
        }
128
    }
129
}
130