Skip to content
Snippets Groups Projects
Commit 3e208146 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2866056 by vaplas, mpdonadio, Wim Leers, dawehner: ResourceTestBase...

Issue #2866056 by vaplas, mpdonadio, Wim Leers, dawehner: ResourceTestBase should not have a timeout
parent daced6fc
No related branches found
No related tags found
No related merge requests found
......@@ -213,7 +213,7 @@ public function testPatchDxForSecuritySensitiveBaseFields() {
RequestOptions::HEADERS => [],
RequestOptions::BODY => $this->serializer->encode($request_body, 'json'),
];
$response = $this->httpClient->request('POST', Url::fromRoute('user.login.http')->setRouteParameter('_format', 'json')->toString(), $request_options);
$response = $this->request('POST', Url::fromRoute('user.login.http')->setRouteParameter('_format', 'json'), $request_options);
$this->assertSame(200, $response->getStatusCode());
}
......
......@@ -93,11 +93,6 @@ abstract class ResourceTestBase extends BrowserTestBase {
*/
public static $modules = ['rest'];
/**
* @var \GuzzleHttp\ClientInterface
*/
protected $httpClient;
/**
* {@inheritdoc}
*/
......@@ -135,10 +130,6 @@ public function setUp() {
// Ensure there's a clean slate: delete all REST resource config entities.
$this->resourceConfigStorage->delete($this->resourceConfigStorage->loadMultiple());
$this->refreshTestStateAfterRestConfigChange();
// Set up a HTTP client that accepts relative URLs.
$this->httpClient = $this->container->get('http_client_factory')
->fromOptions(['base_uri' => $this->baseUrl]);
}
/**
......@@ -344,7 +335,8 @@ protected function grantPermissionsToTestedRole(array $permissions) {
protected function request($method, Url $url, array $request_options) {
$request_options[RequestOptions::HTTP_ERRORS] = FALSE;
$request_options = $this->decorateWithXdebugCookie($request_options);
return $this->httpClient->request($method, $url->toString(), $request_options);
$client = $this->getSession()->getDriver()->getClient()->getClient();
return $client->request($method, $url->setAbsolute(TRUE)->toString(), $request_options);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment