/**
* @internal
*
* @covers \Shopware\Core\Framework\Update\Services\ApiClient
*/
class ApiClientTest extends TestCase
{ public function testCheckForUpdatesDisabled(): void
{ $client =
new ApiClient(new MockHttpClient([]), false, '6.4.0.0', __DIR__
);
$version =
$client->
checkForUpdates();
static::
assertEmpty($version->version
);
} public function testCheckForUpdatesUsingEnv(): void
{ $_SERVER['SW_RECOVERY_NEXT_VERSION'
] = '6.4.1.0';
$client =
new ApiClient(new MockHttpClient([]), true, '6.4.0.0', __DIR__
);
$version =
$client->
checkForUpdates();