Code Duplication    Length = 11-12 lines in 3 locations

Tests/DependencyInjection/MesCryptoExtensionTest.php 3 locations

@@ 27-38 (lines=12) @@
24
    /** @var ContainerBuilder */
25
    private $configuration;
26
27
    public function testContainerWithDefaultValues()
28
    {
29
        $loader = new MesCryptoExtension();
30
        $config = $this->getEmptyConfig();
31
        $loader->load(array($config), $this->configuration);
32
33
        $this->assertHasDefinition('mes_crypto.raw_key');
34
        $this->assertSame('Defuse\Crypto\Key', $this->configuration->findDefinition('mes_crypto.raw_key')
35
                                                                   ->getClass(), 'Defuse\Crypto\Key class is correct');
36
37
        $this->assertNotHasDefinition('mes_crypto.crypto_loader');
38
    }
39
40
    public function testContainerWithRandomKeyAndSecret()
41
    {
@@ 40-51 (lines=12) @@
37
        $this->assertNotHasDefinition('mes_crypto.crypto_loader');
38
    }
39
40
    public function testContainerWithRandomKeyAndSecret()
41
    {
42
        $loader = new MesCryptoExtension();
43
        $config = $this->getConfigWithRandomKeyAndSecret();
44
        $loader->load(array($config), $this->configuration);
45
46
        $this->assertHasDefinition('mes_crypto.raw_key');
47
        $this->assertSame('Defuse\Crypto\KeyProtectedByPassword', $this->configuration->findDefinition('mes_crypto.raw_key')
48
                                                                                      ->getClass(), 'KeyProtectedByPassword class is correct');
49
50
        $this->assertNotHasDefinition('mes_crypto.crypto_loader');
51
    }
52
53
    public function testContainerWithInternalKeyAndSecret()
54
    {
@@ 53-63 (lines=11) @@
50
        $this->assertNotHasDefinition('mes_crypto.crypto_loader');
51
    }
52
53
    public function testContainerWithInternalKeyAndSecret()
54
    {
55
        $loader = new MesCryptoExtension();
56
        $config = $this->getConfigWithInternalKeyAndSecret();
57
        $loader->load(array($config), $this->configuration);
58
59
        $this->assertHasDefinition('mes_crypto.raw_key');
60
        $this->assertSame('Defuse\Crypto\KeyProtectedByPassword', $this->configuration->findDefinition('mes_crypto.raw_key')
61
                                                                                      ->getClass(), 'Defuse\Crypto\KeyProtectedByPassword class is correct');
62
        $this->assertNotHasDefinition('mes_crypto.crypto_loader');
63
    }
64
65
    public function testContainerWithExternalKeyAndSecret()
66
    {