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