You are a developer and looking for Shopware projects?
Apply Now!
AdminAuthController example
public
function
testResetRateLimitOauth
(
)
: void
{
$psrFactory
=
$this
->
createMock
(
PsrHttpFactory::
class
)
;
$psrFactory
->
method
(
'createRequest'
)
->
willReturn
(
$this
->
createMock
(
ServerRequest::
class
)
)
;
$psrFactory
->
method
(
'createResponse'
)
->
willReturn
(
$this
->
createMock
(
ResponseInterface::
class
)
)
;
$authorizationServer
=
$this
->
createMock
(
AuthorizationServer::
class
)
;
$authorizationServer
->
method
(
'respondToAccessTokenRequest'
)
->
willReturn
(
new
Response
(
)
)
;
$controller
=
new
AdminAuthController
(
$authorizationServer
,
$psrFactory
,
$this
->
mockResetLimiter
(
[
RateLimiter::OAUTH => 1,
]
)
)
;
$controller
->
token
(
new
Request
(
)
)
;
}
public
function
testRateLimitContactForm
(
)
: void
{