Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createClientException example
$response
=
$frwController
->
frwStart
(
$this
->
createContext
(
)
)
;
static
::
assertSame
(
SymfonyResponse::HTTP_OK,
$response
->
getStatusCode
(
)
)
;
}
public
function
testTryingToStartFrwFails
(
)
: void
{
$exceptionMessage
= 'frwService::frwStart failed';
$this
->firstRunWizardService->
expects
(
static
::
once
(
)
)
->
method
(
'startFrw'
)
->
willThrowException
(
$this
->
createClientException
(
$exceptionMessage
)
)
;
$frwController
=
new
FirstRunWizardController
(
$this
->firstRunWizardService,
new
StaticEntityRepository
(
[
]
)
,
new
StaticEntityRepository
(
[
]
)
,
)
;
static
::
expectException
(
StoreApiException::
class
)
;
static
::
expectExceptionMessage
(
$exceptionMessage
)
;
$frwController
->
frwStart
(
$this
->
createContext
(
)
)
;
}