From f2f61e719b03e7edebb7b6c58ac80efb4e3c71ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Wed, 27 Sep 2023 21:51:34 +0200 Subject: [PATCH] use new interface of TestCase --- tests/OAuth/GoogleOAuthTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/OAuth/GoogleOAuthTest.php b/tests/OAuth/GoogleOAuthTest.php index 7a04d62..6e8169a 100644 --- a/tests/OAuth/GoogleOAuthTest.php +++ b/tests/OAuth/GoogleOAuthTest.php @@ -16,8 +16,8 @@ final class GoogleOAuthTest extends TestCase $nonce = 'random_nonce_string'; $redirectUrl = 'http://example.com/oauth'; - $requestMock = $this->getMockBuilder(IRequest::class) - ->setMethods(['setUrl', 'setMethod', 'setQuery', 'setHeaders', 'send']) + $requestMock = $this->createMock(IRequest::class) + ->onlyMethods(['setUrl', 'setMethod', 'setQuery', 'setHeaders', 'send']) ->getMock(); $googleOAuth = new GoogleOAuth($requestMock); @@ -47,11 +47,11 @@ final class GoogleOAuthTest extends TestCase $code = 'code_from_google'; $redirectUrl = 'http://example.com/oauth'; - $requestMock = $this->getMockBuilder(IRequest::class) - ->setMethods(['setUrl', 'setMethod', 'setQuery', 'setHeaders', 'send']) + $requestMock = $this->createMock(IRequest::class) + ->onlyMethods(['setUrl', 'setMethod', 'setQuery', 'setHeaders', 'send']) ->getMock(); - $responseMock = $this->getMockBuilder(IResponse::class) - ->setMethods(['getBody', 'getHeaders']) + $responseMock = $this->createMock(IResponse::class) + ->onlyMethods(['getBody', 'getHeaders']) ->getMock(); $googleOAuth = new GoogleOAuth($requestMock);