Skip to content

Commit e244411

Browse files
committed
MC-42008: Problem with customer API route
1 parent 08d178f commit e244411

File tree

1 file changed

+8
-0
lines changed
  • dev/tests/api-functional/framework/Magento/TestFramework/TestCase/HttpClient

1 file changed

+8
-0
lines changed

dev/tests/api-functional/framework/Magento/TestFramework/TestCase/HttpClient/CurlClient.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
class CurlClient
1212
{
1313
const EMPTY_REQUEST_BODY = 'Empty body';
14+
const TMP_COOKIE_FILE = TESTS_TEMP_DIR . '/cookie.txt';
15+
16+
public function __destruct()
17+
{
18+
unlink(self::TMP_COOKIE_FILE);
19+
}
1420

1521
/**
1622
* Perform HTTP GET request
@@ -186,6 +192,8 @@ private function getCurlOptions($customCurlOpts = [], $headers = [])
186192
CURLOPT_MAXREDIRS => 10, // but don't redirect more than 10 times
187193
CURLOPT_HTTPHEADER => [],
188194
CURLOPT_HEADER => 1,
195+
CURLOPT_COOKIEJAR => self::TMP_COOKIE_FILE,
196+
CURLOPT_COOKIEFILE => self::TMP_COOKIE_FILE
189197
];
190198

191199
// merge headers

0 commit comments

Comments
 (0)