Skip to content

Commit 0778e2d

Browse files
committed
B2B-1704: Add MFTF test for MC-38621
- Cleaning up curl helpers
1 parent cfec669 commit 0778e2d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/code/Magento/Catalog/Test/Mftf/Helper/CurlHelpers.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ class CurlHelpers extends Helper
2121
* @param string $expectedString
2222
* @return void
2323
*
24-
* @throws \Magento\Framework\Exception\FileSystemException
2524
*/
2625
public function assertCurlResponseContainsString($url, $expectedString): void
2726
{
28-
$cookie = $this->getCookie();
27+
$cookie = $this->getCookie('admin');
2928
$curlResponse = $this->getCurlResponse($url, $cookie);
3029
$this->assertStringContainsString($expectedString, $curlResponse);
3130
}
@@ -37,7 +36,6 @@ public function assertCurlResponseContainsString($url, $expectedString): void
3736
* @param string $cookie
3837
* @return string
3938
*
40-
* @throws \Magento\Framework\Exception\FileSystemException
4139
*/
4240
public function getCurlResponse($url, $cookie): string
4341
{
@@ -47,7 +45,6 @@ public function getCurlResponse($url, $cookie): string
4745

4846
// Set Options
4947
curl_setopt($session, CURLOPT_COOKIE, $cookie);
50-
// curl_setopt($session, CURLOPT_POST, true);
5148
curl_setopt($session, CURLOPT_HEADER, false);
5249
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
5350
curl_setopt($session, CURLOPT_FOLLOWLOCATION, true);
@@ -65,9 +62,9 @@ public function getCurlResponse($url, $cookie): string
6562
/**
6663
* Gets the value of the specified cookie and returns the key value pair of the cookie
6764
*
65+
* @param string $cookieName
6866
* @return string
6967
*
70-
* @throws \Magento\Framework\Exception\FileSystemException
7168
*/
7269
public function getCookie($cookieName = 'admin'): string
7370
{

0 commit comments

Comments
 (0)