Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getHandlerFromConfig example
#[Package('merchant-services')]
class
StoreClientFactoryTest
extends
TestCase
{
public
function
testCreatesClientWithoutMiddlewares
(
)
: void
{
$factory
=
new
StoreClientFactory
(
$this
->
createSystemConfigService
(
)
)
;
$client
=
$factory
->
create
(
)
;
$config
=
$this
->
getConfigFromClient
(
$client
)
;
$handler
=
$this
->
getHandlerFromConfig
(
$config
)
;
static
::
assertTrue
(
$handler
->
hasHandler
(
)
)
;
}
public
function
testCreatesClientWithMiddlewares
(
)
: void
{
$factory
=
new
StoreClientFactory
(
$this
->
createSystemConfigService
(
)
)
;
$client
=
$factory
->
create
(
[
$this
->
createMock
(
VerifyResponseSignatureMiddleware::
class
)
]
)
;
$config
=
$this
->
getConfigFromClient
(
$client
)
;
$handler
=
$this
->
getHandlerFromConfig
(
$config
)
;