Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
enableProfiler example
public
function
testProfilerIsDisabled
(
$insulate
)
{
$client
=
$this
->
createClient
(
[
'test_case' => 'Profiler', 'root_config' => 'config.yml'
]
)
;
if
(
$insulate
)
{
$client
->
insulate
(
)
;
}
$client
->
request
(
'GET', '/profiler'
)
;
$this
->
assertNull
(
$client
->
getProfile
(
)
)
;
// enable the profiler for the next request
$client
->
enableProfiler
(
)
;
$this
->
assertNull
(
$client
->
getProfile
(
)
)
;
$client
->
request
(
'GET', '/profiler'
)
;
$this
->
assertIsObject
(
$client
->
getProfile
(
)
)
;
$client
->
request
(
'GET', '/profiler'
)
;
$this
->
assertNull
(
$client
->
getProfile
(
)
)
;
}
/** * @dataProvider getConfigs */