Code Duplication    Length = 12-13 lines in 2 locations

tests/php/Core/Injector/InjectorTest.php 2 locations

@@ 286-297 (lines=12) @@
283
        $this->assertEquals($myObject->auto, 'somevalue');
284
    }
285
286
    public function testSettingSpecificProperty()
287
    {
288
        $injector = new Injector();
289
        $config = array(AnotherService::class);
290
        $injector->load($config);
291
        $injector->setInjectMapping(TestObject::class, 'sampleService', AnotherService::class);
292
        $testObject = $injector->get(TestObject::class);
293
294
        $this->assertInstanceOf(
295
            AnotherService::class,
296
            $testObject->sampleService
297
        );
298
    }
299
300
    public function testSettingSpecificMethod()
@@ 300-312 (lines=13) @@
297
        );
298
    }
299
300
    public function testSettingSpecificMethod()
301
    {
302
        $injector = new Injector();
303
        $config = array(AnotherService::class);
304
        $injector->load($config);
305
        $injector->setInjectMapping(TestObject::class, 'setSomething', AnotherService::class, 'method');
306
307
        $testObject = $injector->get(TestObject::class);
308
309
        $this->assertInstanceOf(
310
            AnotherService::class,
311
            $testObject->sampleService
312
        );
313
    }
314
315
    public function testInjectingScopedService()