Skip to content

Commit

Permalink
Use internal response for testing responses
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandoorn committed Dec 18, 2024
1 parent 26dd39b commit 5b6a860
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/Application/.env
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ APP_SECRET=EDITME
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls
DATABASE_URL=sqlite:///%kernel.project_dir%/var/db_%kernel.environment%.db
DATABASE_URL="mysql://root:root@127.0.0.1/sylius"

###< doctrine/doctrine-bundle ###

###> lexik/jwt-authentication-bundle ###
Expand Down
Empty file.
6 changes: 5 additions & 1 deletion tests/Controller/XmlApiTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ protected function getResponse(string $uri): Response
{
$this->client->request('GET', $uri);

return $this->client->getResponse();
return new Response(
$this->client->getInternalResponse()->getContent(),
$this->client->getInternalResponse()->getStatusCode(),
$this->client->getInternalResponse()->getHeaders(),
);
}

protected function deleteSitemaps(): void
Expand Down

0 comments on commit 5b6a860

Please sign in to comment.