Code Duplication    Length = 9-9 lines in 3 locations

Tests/DependencyInjection/VMProApiExtensionTest.php 3 locations

@@ 17-25 (lines=9) @@
14
     * Assert whether an exception is thrown when required configuration
15
     * key 'vm_pro_api.credentials' is missing.
16
     */
17
    public function testConfigurationLoadThrowsExceptionUnlessCredentials(): void
18
    {
19
        $this->expectException(InvalidConfigurationException::class);
20
        $loader = new VMProApiExtension();
21
        $config = $this->getEmptyConfig();
22
23
        unset($config['vm_pro_api']['credentials']);
24
        $loader->load($config, new ContainerBuilder());
25
    }
26
27
    /**
28
     * Assert whether an exception is thrown when required configuration
@@ 31-39 (lines=9) @@
28
     * Assert whether an exception is thrown when required configuration
29
     * key 'vm_pro_api.credentials.username' is missing.
30
     */
31
    public function testConfigurationLoadThrowsExceptionUnlessUsername(): void
32
    {
33
        $this->expectException(InvalidConfigurationException::class);
34
        $loader = new VMProApiExtension();
35
        $config = $this->getEmptyConfig();
36
37
        unset($config['vm_pro_api']['credentials']['username']);
38
        $loader->load($config, new ContainerBuilder());
39
    }
40
41
    /**
42
     * Assert whether an exception is thrown when required configuration
@@ 45-53 (lines=9) @@
42
     * Assert whether an exception is thrown when required configuration
43
     * key 'vm_pro_api.credentials.password' is missing.
44
     */
45
    public function testConfigurationLoadThrowsExceptionUnlessPassword(): void
46
    {
47
        $this->expectException(InvalidConfigurationException::class);
48
        $loader = new VMProApiExtension();
49
        $config = $this->getEmptyConfig();
50
51
        unset($config['vm_pro_api']['credentials']['password']);
52
        $loader->load($config, new ContainerBuilder());
53
    }
54
55
    /**
56
     * Assert whether the configuration keys and values are successfully