Code Duplication    Length = 6-6 lines in 3 locations

shared/tests/N98/Util/AutoloadHandlerTest.php 3 locations

@@ 77-82 (lines=6) @@
74
    public function registrationAndDeregistration()
75
    {
76
        $calls = (object) array('retval' => true);
77
        $assertAble = function ($className) use (&$calls) {
78
            $calls->log[] = array($className);
79
            $calls->count[$className] = 1 + @$calls->count[$className];
80
81
            return $calls->retval;
82
        };
83
84
        $handler = $this->create($assertAble);
85
        $this->assertTrue($handler->isEnabled());
@@ 99-104 (lines=6) @@
96
    public function changingCallback()
97
    {
98
        $calls = (object) array('retval' => true);
99
        $assertAble = function ($className) use (&$calls) {
100
            $calls->log[] = array($className);
101
            $calls->count[$className] = 1 + @$calls->count[$className];
102
103
            return $calls->retval;
104
        };
105
106
        $handler = $this->create(null, AutoloadHandler::NO_EXCEPTION);
107
        $this->assertFalse($handler->__invoke("Test"));
@@ 158-163 (lines=6) @@
155
    public function cleanupCallback()
156
    {
157
        $calls = (object) array('retval' => true);
158
        $assertAble = function ($className) use (&$calls) {
159
            $calls->log[] = array($className);
160
            $calls->count[$className] = 1 + @$calls->count[$className];
161
162
            return $calls->retval;
163
        };
164
165
        $handler = $this->create($assertAble, AutoloadHandler::NO_EXCEPTION);
166
        $cleanup = $handler->getCleanupCallback();