Skip to content

Commit

Permalink
Add cache folder
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Apr 29, 2022
1 parent 19ba71e commit 4f6f305
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
/.phpunit.result.cache
/composer.lock

/tests/*.pdf
/var/cache/*
!/var/cache/.gitkeep
/.token
2 changes: 1 addition & 1 deletion dev/document-telechargement.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
$response = $provider->documentTelechargement($request);

// Set a filename.
$filename = __DIR__ . "/../" . $request->getToken() . ".pdf";
$filename = __DIR__ . "/../var/cache/" . $request->getToken() . ".pdf";

// Handle the response.
$response->saveAs($filename);
2 changes: 1 addition & 1 deletion tests/Provider/APIv2ProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function testDocumentTelechargement(): void {
$request->setToken("SzQ0MzA2MTg0MQ");

// Set a filename mock.
$filename = __DIR__ . "/../" . $request->getToken() . ".pdf";
$filename = __DIR__ . "/../../var/cache/" . $request->getToken() . ".pdf";
if (true === file_exists($filename)) {
unlink($filename);
}
Expand Down
Empty file added var/cache/.gitkeep
Empty file.

0 comments on commit 4f6f305

Please sign in to comment.