Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Adjust to changed naming of security package
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Sep 16, 2019
1 parent 0fb7aa3 commit 6be6192
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/Middleware/CsrfTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use TheSeer\Tokenizer\Token;
use Yiisoft\Router\Method;
use Yiisoft\Security\Random;
use Yiisoft\Security\TokenMasker;
use Yiisoft\Security\TokenMask;
use Yiisoft\Yii\Web\Middleware\Csrf;
use Yiisoft\Yii\Web\Session\SessionInterface;

Expand Down Expand Up @@ -129,7 +130,7 @@ private function createDeleteServerRequestWithBodyToken(string $token): ServerRe
private function createPostServerRequestWithHeaderToken(string $token): ServerRequestInterface
{
return $this->createServerRequest(Method::POST, [], [
Csrf::HEADER_NAME => TokenMasker::mask($token),
Csrf::HEADER_NAME => TokenMask::apply($token),
]);
}

Expand Down Expand Up @@ -174,7 +175,7 @@ private function generateToken(): string
private function getBodyRequestParamsByToken(string $token): array
{
return [
self::PARAM_NAME => TokenMasker::mask($token),
self::PARAM_NAME => TokenMask::apply($token),
];
}
}

0 comments on commit 6be6192

Please sign in to comment.