mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-11 22:32:07 +05:30
25 lines
593 B
PHP
25 lines
593 B
PHP
|
<?php
|
||
|
|
||
|
namespace LeagueTests\CodeChallengeVerifiers;
|
||
|
|
||
|
use League\OAuth2\Server\CodeChallengeVerifiers\PlainVerifier;
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
|
||
|
class PlainVerifierTest extends TestCase
|
||
|
{
|
||
|
public function testGetMethod()
|
||
|
{
|
||
|
$verifier = new PlainVerifier();
|
||
|
|
||
|
$this->assertEquals('plain', $verifier->getMethod());
|
||
|
}
|
||
|
|
||
|
public function testVerifyCodeChallenge()
|
||
|
{
|
||
|
$verifier = new PlainVerifier();
|
||
|
|
||
|
$this->assertTrue($verifier->verifyCodeChallenge('foo', 'foo');
|
||
|
$this->assertFalse($verifier->verifyCodeChallenge('foo', 'bar');
|
||
|
}
|
||
|
}
|