summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWitold Wasiczko <snapshotpl@users.noreply.github.com>2022-05-31 19:12:58 +0300
committerGitHub <noreply@github.com>2022-05-31 19:12:58 +0300
commit2bfaf9d7bbebe2ba1c1deb48e756ba0b3af4e985 (patch)
treeaf3f4921d83036b39edf94289bd8d2c8a3db8f09 /test
parent60254fc7fbb08ce56164faae9e075068adf914ef (diff)
downloadoauth2-server-php-2bfaf9d7bbebe2ba1c1deb48e756ba0b3af4e985.tar.xz
fix: PHP 8.1 deprecation error (#1021)v1.12.1
Diffstat (limited to 'test')
-rw-r--r--test/OAuth2/TokenType/BearerTest.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/OAuth2/TokenType/BearerTest.php b/test/OAuth2/TokenType/BearerTest.php
index 71cca3b..021fc7f 100644
--- a/test/OAuth2/TokenType/BearerTest.php
+++ b/test/OAuth2/TokenType/BearerTest.php
@@ -35,6 +35,17 @@ class BearerTest extends TestCase
$this->assertEquals($response->getParameter('error_description'), 'The content type for POST requests must be "application/x-www-form-urlencoded"');
}
+ public function testMissingContentTypeExpectsToBeCorrectContent()
+ {
+ $bearer = new Bearer();
+ $request = TestRequest::createPost(array(
+ 'access_token' => 'ThisIsMyAccessToken'
+ ));
+
+ $param = $bearer->getAccessTokenParameter($request, $response = new Response());
+ $this->assertEquals($param, 'ThisIsMyAccessToken');
+ }
+
public function testValidRequestUsingAuthorizationHeader()
{
$bearer = new Bearer();