oauth2-server/tests/CodeChallengeVerifiers/PlainVerifierTest.php

25 lines
595 B
PHP
Raw Permalink Normal View History

2018-09-22 00:42:05 +05:30
<?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();
2018-09-22 01:05:04 +05:30
$this->assertTrue($verifier->verifyCodeChallenge('foo', 'foo'));
$this->assertFalse($verifier->verifyCodeChallenge('foo', 'bar'));
2018-09-22 00:42:05 +05:30
}
}