Code Duplication    Length = 10-10 lines in 6 locations

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/Gimme/Context/ContextTest.php 1 location

@@ 87-96 (lines=10) @@
84
        self::assertCount(1, $this->context->getRegisteredMeta());
85
    }
86
87
    protected function tearDown()
88
    {
89
        $reflection = new \ReflectionObject($this);
90
        foreach ($reflection->getProperties() as $prop) {
91
            if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {
92
                $prop->setAccessible(true);
93
                $prop->setValue($this, null);
94
            }
95
        }
96
    }
97
}
98

Tests/Twig/Node/GimmeListNodeTest.php 1 location

@@ 340-349 (lines=10) @@
337
        ];
338
    }
339
340
    protected function tearDown()
341
    {
342
        $reflection = new \ReflectionObject($this);
343
        foreach ($reflection->getProperties() as $prop) {
344
            if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {
345
                $prop->setAccessible(true);
346
                $prop->setValue($this, null);
347
            }
348
        }
349
    }
350
}
351

Tests/Twig/Node/GimmeNodeTest.php 1 location

@@ 138-147 (lines=10) @@
135
        $twig->render('error_gimme');
136
    }
137
138
    protected function tearDown()
139
    {
140
        $reflection = new \ReflectionObject($this);
141
        foreach ($reflection->getProperties() as $prop) {
142
            if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {
143
                $prop->setAccessible(true);
144
                $prop->setValue($this, null);
145
            }
146
        }
147
    }
148
}
149