Code Duplication    Length = 7-7 lines in 3 locations

module/Common/test/Factory/LoggerFactoryTest.php 3 locations

@@ 25-31 (lines=7) @@
22
    /**
23
     * @test
24
     */
25
    public function serviceIsCreated()
26
    {
27
        /** @var Logger $instance */
28
        $instance = $this->factory->__invoke(new ServiceManager(), '');
29
        $this->assertInstanceOf(LoggerInterface::class, $instance);
30
        $this->assertEquals('Logger', $instance->getName());
31
    }
32
33
    /**
34
     * @test
@@ 36-42 (lines=7) @@
33
    /**
34
     * @test
35
     */
36
    public function nameIsSetFromOptions()
37
    {
38
        /** @var Logger $instance */
39
        $instance = $this->factory->__invoke(new ServiceManager(), '', ['logger_name' => 'Foo']);
40
        $this->assertInstanceOf(LoggerInterface::class, $instance);
41
        $this->assertEquals('Foo', $instance->getName());
42
    }
43
44
    /**
45
     * @test
@@ 47-53 (lines=7) @@
44
    /**
45
     * @test
46
     */
47
    public function serviceNameOverwritesOptionsLoggerName()
48
    {
49
        /** @var Logger $instance */
50
        $instance = $this->factory->__invoke(new ServiceManager(), 'Logger_Shlink', ['logger_name' => 'Foo']);
51
        $this->assertInstanceOf(LoggerInterface::class, $instance);
52
        $this->assertEquals('Shlink', $instance->getName());
53
    }
54
}
55