Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
FakeTokenProvider | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
3 | |
100.00% |
1 / 1 |
createToken | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
validateToken | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
2 |
1 | <?php |
2 | namespace Apie\Core\Session; |
3 | |
4 | use Apie\Core\Exceptions\InvalidCsrfTokenException; |
5 | |
6 | class FakeTokenProvider implements CsrfTokenProvider |
7 | { |
8 | public function createToken(): string |
9 | { |
10 | return 'string'; |
11 | } |
12 | public function validateToken(string $token): void |
13 | { |
14 | if ($token !== 'string') { |
15 | throw new InvalidCsrfTokenException(); |
16 | } |
17 | } |
18 | } |