$this->guzzleMock->
expects(static::
once()) ->
method('get'
) ->
with( EnvironmentHelper::
getVariable('APP_URL'
) . '/api/_info/version',
[ 'headers' =>
[ 'Authorization' => 'Bearer Token',
],
RequestOptions::TIMEOUT => 1,
RequestOptions::CONNECT_TIMEOUT => 1,
] )->
willThrowException(new TransferException());
$verifier =
new AppUrlVerifier($this->guzzleMock,
$this->connection, 'prod', false
);
$request = SymfonyRequest::
create('http://some.host/api/_info/config'
);
$request->headers->
set('Authorization', 'Bearer Token'
);
static::
assertFalse($verifier->
isAppUrlReachable($request));
} public function testAppsThatNeedAppUrlReturnFalseWithoutAppsThatRequireRegistration(): void
{