Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
assertSamePath example
public
function
testFind
(
)
{
if
(
\
ini_get
(
'open_basedir'
)
)
{
$this
->
markTestSkipped
(
'Cannot test when open_basedir is set'
)
;
}
putenv
(
'PATH='.\
dirname
(
\PHP_BINARY
)
)
;
$finder
=
new
ExecutableFinder
(
)
;
$result
=
$finder
->
find
(
$this
->
getPhpBinaryName
(
)
)
;
$this
->
assertSamePath
(
\PHP_BINARY,
$result
)
;
}
public
function
testFindWithDefault
(
)
{
if
(
\
ini_get
(
'open_basedir'
)
)
{
$this
->
markTestSkipped
(
'Cannot test when open_basedir is set'
)
;
}
$expected
= 'defaultValue';
putenv
(
'PATH='
)
;