Completed
Push — master ( c1fd82...c93584 )
by Francesco
04:19
created
Tests/KeyStorage/KeyStorageTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         $this->keyStorage->setKey($key);
35 35
 
36 36
         $this->assertInstanceOf('Defuse\Crypto\KeyProtectedByPassword', $this->keyStorage->getKey()
37
-                                                                                         ->getRawKey());
37
+                                                                                            ->getRawKey());
38 38
         $this->assertSame($secret, $this->keyStorage->getKey()
39 39
                                                     ->getSecret());
40 40
     }
Please login to merge, or discard this patch.
Tests/KeyManagerWrapperTest.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
     public function testGenerateCreatesKey()
37 37
     {
38 38
         $this->keyManager->expects($this->once())
39
-                         ->method('generate')
40
-                         ->with(null)
41
-                         ->will($this->returnValue($this->getMock('Mes\Security\CryptoBundle\Model\KeyInterface')));
39
+                            ->method('generate')
40
+                            ->with(null)
41
+                            ->will($this->returnValue($this->getMock('Mes\Security\CryptoBundle\Model\KeyInterface')));
42 42
 
43 43
         $key = $this->wrapper->generate();
44 44
 
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
     {
53 53
         try {
54 54
             $this->keyManager->expects($this->once())
55
-                             ->method('generate')
56
-                             ->with(null)
57
-                             ->will($this->throwException(new EnvironmentIsBrokenException()));
55
+                                ->method('generate')
56
+                                ->with(null)
57
+                                ->will($this->throwException(new EnvironmentIsBrokenException()));
58 58
         } catch (EnvironmentIsBrokenException $ex) {
59 59
             $this->throwException(new CryptoException());
60 60
         }
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
         $secret = 'ThisIsASecretPassword';
69 69
 
70 70
         $this->keyManager->expects($this->once())
71
-                         ->method('generateFromAscii')
72
-                         ->with($key_encoded, $secret)
73
-                         ->will($this->returnValue($this->getMock('Mes\Security\CryptoBundle\Model\KeyInterface')));
71
+                            ->method('generateFromAscii')
72
+                            ->with($key_encoded, $secret)
73
+                            ->will($this->returnValue($this->getMock('Mes\Security\CryptoBundle\Model\KeyInterface')));
74 74
 
75 75
         $key = $this->wrapper->generateFromAscii($key_encoded, $secret);
76 76
 
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 
88 88
         try {
89 89
             $this->keyManager->expects($this->once())
90
-                             ->method('generateFromAscii')
91
-                             ->with($key_encoded, $secret)
92
-                             ->will($this->throwException(new BaseCryptoException()));
90
+                                ->method('generateFromAscii')
91
+                                ->with($key_encoded, $secret)
92
+                                ->will($this->throwException(new BaseCryptoException()));
93 93
         } catch (CryptoException $ex) {
94 94
             $this->throwException(new CryptoException());
95 95
         }
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
     public function testGetKeyReadsKey()
101 101
     {
102 102
         $this->keyManager->expects($this->once())
103
-                         ->method('getKey')
104
-                         ->will($this->returnValue($this->getMock('Mes\Security\CryptoBundle\Model\KeyInterface')));
103
+                            ->method('getKey')
104
+                            ->will($this->returnValue($this->getMock('Mes\Security\CryptoBundle\Model\KeyInterface')));
105 105
 
106 106
         $key = $this->wrapper->getKey();
107 107
 
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
     public function testSetKeyStoresKey()
112 112
     {
113 113
         $this->keyManager->expects($this->once())
114
-                         ->method('setKey')
115
-                         ->with($this->getMock('Mes\Security\CryptoBundle\Model\KeyInterface'));
114
+                            ->method('setKey')
115
+                            ->with($this->getMock('Mes\Security\CryptoBundle\Model\KeyInterface'));
116 116
 
117 117
         $this->wrapper->setKey($this->getMock('Mes\Security\CryptoBundle\Model\KeyInterface'));
118 118
     }
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
     public function testSetSecretStoresSecret()
121 121
     {
122 122
         $this->keyManager->expects($this->once())
123
-                         ->method('setSecret')
124
-                         ->with('ThisIsASecret');
123
+                            ->method('setSecret')
124
+                            ->with('ThisIsASecret');
125 125
 
126 126
         $this->wrapper->setSecret('ThisIsASecret');
127 127
     }
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
     public function testGetSecretReadsSecret()
130 130
     {
131 131
         $this->keyManager->expects($this->once())
132
-                         ->method('getSecret')
133
-                         ->will($this->returnValue('ThisIsYourSecret'));
132
+                            ->method('getSecret')
133
+                            ->will($this->returnValue('ThisIsYourSecret'));
134 134
 
135 135
         $secret = $this->wrapper->getSecret();
136 136
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     protected function setUp()
141 141
     {
142 142
         $this->keyManager = $this->getMockBuilder('\Mes\Security\CryptoBundle\KeyManagerInterface')
143
-                                 ->getMock();
143
+                                    ->getMock();
144 144
         $this->wrapper = new KeyManagerWrapper($this->keyManager);
145 145
     }
146 146
 
Please login to merge, or discard this patch.