Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isBooted example
}
public
function
testConstructor
(
)
{
$env
= 'test_env';
$debug
= true;
$kernel
=
new
KernelForTest
(
$env
,
$debug
)
;
$this
->
assertEquals
(
$env
,
$kernel
->
getEnvironment
(
)
)
;
$this
->
assertEquals
(
$debug
,
$kernel
->
isDebug
(
)
)
;
$this
->
assertFalse
(
$kernel
->
isBooted
(
)
)
;
$this
->
assertLessThanOrEqual
(
microtime
(
true
)
,
$kernel
->
getStartTime
(
)
)
;
}
public
function
testEmptyEnv
(
)
{
$this
->
expectException
(
\InvalidArgumentException::
class
)
;
$this
->
expectExceptionMessage
(
sprintf
(
'Invalid environment provided to "%s": the environment cannot be empty.', KernelForTest::
class
)
)
;
new
KernelForTest
(
'', false
)
;
}