Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getPHPBinary example
static
::
assertTrue
(
$recoveryManager
->
isFlexProject
(
$tmpDir
)
)
;
}
public
function
testGetPHPBinary
(
)
: void
{
$recoveryManager
=
new
RecoveryManager
(
)
;
$request
=
new
Request
(
)
;
$request
->
setSession
(
new
Session
(
new
MockArraySessionStorage
(
)
)
)
;
$request
->
getSession
(
)
->
set
(
'phpBinary', 'php'
)
;
static
::
assertSame
(
'php',
$recoveryManager
->
getPHPBinary
(
$request
)
)
;
}
private
function
prepareShopware
(
Filesystem
$fs
, string
$tmpDir
, string
$version
= '6.4.10.0'
)
: void
{
$fs
->
mkdir
(
$tmpDir
)
;
$fs
->
mkdir
(
$tmpDir
. '/public'
)
;
$_SERVER
[
'SCRIPT_FILENAME'
]
=
$tmpDir
. '/public/shopware-installer.phar.php';
$fs
->
touch
(
$_SERVER
[
'SCRIPT_FILENAME'
]
)
;
$fs
->
dumpFile
(
$tmpDir
. '/composer.json',
json_encode
(
[