static::
assertNotFalse($licensesJson);
static::
assertNotFalse($swagAppJson);
$this->
getRequestHandler()->
append(new Response(200,
[], '{}'
));
$this->
getRequestHandler()->
append(new Response(200,
[],
$licensesJson));
$this->
getRequestHandler()->
append(new Response(200,
[], '{"location": "http://localhost/my.zip", "type": "app"}'
));
$this->
getRequestHandler()->
append(new Response(200,
[],
$swagAppJson));
$expectedLocation =
$this->
getContainer()->
getParameter('kernel.app_dir'
) . '/SwagApp';
try { $this->updater->
updateApps($this->context
);
$apps =
$this->appRepo->
search(new Criteria(),
$this->context
);
static::
assertEquals(1,
$apps->
count());
/** @var AppEntity $testApp */
$testApp =
$apps->
first();
static::
assertEquals('2.0.0',
$testApp->
getVersion());
} finally { (new Filesystem())->
remove($expectedLocation);
} }