@@ 99-107 (lines=9) @@ | ||
96 | /** |
|
97 | * @test |
|
98 | */ |
|
99 | public function willGetRsaSignatureValidatorWhenTypeIsNotSpecified() |
|
100 | { |
|
101 | $key = new JwtKey(['secret' => 'Buy the book']); |
|
102 | $actual = $key->getSignatureValidator(); |
|
103 | $this->assertInstanceOf( |
|
104 | 'KleijnWeb\JwtBundle\Authenticator\SignatureValidator\HmacValidator', |
|
105 | $actual |
|
106 | ); |
|
107 | } |
|
108 | ||
109 | /** |
|
110 | * @test |
|
@@ 112-120 (lines=9) @@ | ||
109 | /** |
|
110 | * @test |
|
111 | */ |
|
112 | public function willGetRsaSignatureValidatorWhenTypeIsRsa() |
|
113 | { |
|
114 | $key = new JwtKey(['secret' => 'Buy the book', 'type' => JwtKey::TYPE_RSA]); |
|
115 | $actual = $key->getSignatureValidator(); |
|
116 | $this->assertInstanceOf( |
|
117 | 'KleijnWeb\JwtBundle\Authenticator\SignatureValidator\RsaValidator', |
|
118 | $actual |
|
119 | ); |
|
120 | } |
|
121 | ||
122 | /** |
|
123 | * @test |