use new interface of TestCase
Some checks failed
soko-web/pipeline/pr-master There was a failure building this commit

This commit is contained in:
Bence Pőcze 2023-09-27 21:51:34 +02:00
parent 2226b88a88
commit f2f61e719b
Signed by: bence
GPG Key ID: DC5BD6E95A333E6D

View File

@ -16,8 +16,8 @@ final class GoogleOAuthTest extends TestCase
$nonce = 'random_nonce_string'; $nonce = 'random_nonce_string';
$redirectUrl = 'http://example.com/oauth'; $redirectUrl = 'http://example.com/oauth';
$requestMock = $this->getMockBuilder(IRequest::class) $requestMock = $this->createMock(IRequest::class)
->setMethods(['setUrl', 'setMethod', 'setQuery', 'setHeaders', 'send']) ->onlyMethods(['setUrl', 'setMethod', 'setQuery', 'setHeaders', 'send'])
->getMock(); ->getMock();
$googleOAuth = new GoogleOAuth($requestMock); $googleOAuth = new GoogleOAuth($requestMock);
@ -47,11 +47,11 @@ final class GoogleOAuthTest extends TestCase
$code = 'code_from_google'; $code = 'code_from_google';
$redirectUrl = 'http://example.com/oauth'; $redirectUrl = 'http://example.com/oauth';
$requestMock = $this->getMockBuilder(IRequest::class) $requestMock = $this->createMock(IRequest::class)
->setMethods(['setUrl', 'setMethod', 'setQuery', 'setHeaders', 'send']) ->onlyMethods(['setUrl', 'setMethod', 'setQuery', 'setHeaders', 'send'])
->getMock(); ->getMock();
$responseMock = $this->getMockBuilder(IResponse::class) $responseMock = $this->createMock(IResponse::class)
->setMethods(['getBody', 'getHeaders']) ->onlyMethods(['getBody', 'getHeaders'])
->getMock(); ->getMock();
$googleOAuth = new GoogleOAuth($requestMock); $googleOAuth = new GoogleOAuth($requestMock);