@@ -23,13 +23,13 @@ discard block |
||
23 | 23 | $this->privateKey = 'privateKey'; |
24 | 24 | $this->reflector = new \ReflectionClass(HashHmac::class); |
25 | 25 | $this->data = ['foo' => 'bar']; |
26 | - $this->hmac = new HashHmac($this->privateKey,$this->algo); |
|
26 | + $this->hmac = new HashHmac($this->privateKey, $this->algo); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function testHash() |
30 | 30 | { |
31 | 31 | $actual = $this->hmac->create($this->data); |
32 | - $expected = hash_hmac($this->algo, json_encode($this->data) , $this->privateKey); |
|
32 | + $expected = hash_hmac($this->algo, json_encode($this->data), $this->privateKey); |
|
33 | 33 | $result = \hash_equals($actual, $expected); |
34 | 34 | $this->assertEquals(true, $result); |
35 | 35 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public function testCompareHash() |
38 | 38 | { |
39 | 39 | $encodedHash = $this->hmac->create($this->data); |
40 | - $this->assertEquals(true, $this->hmac->verify($encodedHash,$this->data)); |
|
40 | + $this->assertEquals(true, $this->hmac->verify($encodedHash, $this->data)); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | public function testCompareHashInvalidAlgo() |