Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setMaintenanceMode example
private
TestDataCollection
$ids
;
protected
function
setUp
(
)
: void
{
$this
->ids =
new
TestDataCollection
(
)
;
$this
->
createData
(
)
;
}
public
function
testMaintenancePageLoadedHookScriptsAreExecuted
(
)
: void
{
$this
->
setMaintenanceMode
(
)
;
$browser
= KernelLifecycleManager::
createBrowser
(
$this
->
getKernel
(
)
)
;
$browser
->
followRedirects
(
)
;
$browser
->
request
(
'GET', EnvironmentHelper::
getVariable
(
'APP_URL'
)
. '/'
)
;
$response
=
$browser
->
getResponse
(
)
;
static
::
assertEquals
(
503,
$response
->
getStatusCode
(
)
)
;
$traces
=
$this
->
getContainer
(
)
->
get
(
ScriptTraces::
class
)
->
getTraces
(
)
;