Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
license example
'@Installer/installer/license.html.twig',
array_merge
(
$this
->
getDefaultViewParams
(
)
,
[
'licenseAgreement' => 'licenseText',
'error' => null,
]
)
,
)
->
willReturn
(
'license'
)
;
$controller
=
new
LicenseController
(
$licenseFetcher
)
;
$controller
->
setContainer
(
$this
->
getInstallerContainer
(
$twig
)
)
;
$response
=
$controller
->
license
(
$request
)
;
static
::
assertSame
(
'license',
$response
->
getContent
(
)
)
;
}
public
function
testLicenseRouteRendersErrorIfLicenseCanNotBeFetched
(
)
: void
{
$request
=
new
Request
(
)
;
$request
->
setMethod
(
'GET'
)
;
$licenseFetcher
=
$this
->
createMock
(
LicenseFetcher::
class
)
;
$licenseFetcher
->
expects
(
static
::
once
(
)
)
->
method
(
'fetch'
)