Code Duplication    Length = 17-17 lines in 2 locations

tests/Unit/Factory/AspectKernelFactoryTest.php 2 locations

@@ 20-36 (lines=17) @@
17
    /**
18
     * @test
19
     */
20
    public function itCreatesKernelOnInvoke()
21
    {
22
        $serviceLocator = $this->prophesize(ServiceLocatorInterface::class);
23
        $serviceLocator->get('config')
24
            ->willReturn(['goaop_module' => require static::CONFIG_PATH])
25
            ->shouldBeCalled();
26
27
        $factory = new AspectKernelFactory();
28
29
        $instance = $factory($serviceLocator->reveal(), AspectKernel::class);
30
31
        $this->assertInstanceOf(
32
            AspectKernel::class,
33
            $instance,
34
            'factory should return an instance of ' . AspectKernel::class
35
        );
36
    }
37
38
    /**
39
     * @test
@@ 41-57 (lines=17) @@
38
    /**
39
     * @test
40
     */
41
    public function itCreatesKernelOnCreateService()
42
    {
43
        $serviceLocator = $this->prophesize(ServiceLocatorInterface::class);
44
        $serviceLocator->get('config')
45
            ->willReturn(['goaop_module' => require static::CONFIG_PATH])
46
            ->shouldBeCalled();
47
48
        $factory = new AspectKernelFactory();
49
50
        $instance = $factory->createService($serviceLocator->reveal());
51
52
        $this->assertInstanceOf(
53
            AspectKernel::class,
54
            $instance,
55
            'factory should return an instance of ' . AspectKernel::class
56
        );
57
    }
58
}