Skip to content

Commit ac0dea5

Browse files
committed
Corrects for Test.
1 parent fe0bd17 commit ac0dea5

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

dev/tests/api-functional/testsuite/Magento/Webapi/RestSessionCookieTest.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace Magento\Webapi;
88

9+
use Magento\Framework\Module\Manager;
910
use Magento\TestFramework\Helper\Bootstrap;
1011

1112
/**
@@ -14,6 +15,21 @@
1415
class RestSessionCookieTest extends \Magento\TestFramework\TestCase\WebapiAbstract
1516
{
1617

18+
private $moduleManager;
19+
private $objectManager;
20+
21+
/**
22+
* @inheritdoc
23+
*/
24+
protected function setUp(): void
25+
{
26+
$this->objectManager = Bootstrap::getObjectManager();
27+
$this->moduleManager = $this->objectManager->get(Manager::class);
28+
if ($this->moduleManager->isEnabled('Magento_B2b')) {
29+
$this->markTestSkipped('Skipped, because this logic is rewritten on B2B.');
30+
}
31+
}
32+
1733
/**
1834
* Check for non exist cookie PHPSESSID
1935
*/
@@ -22,7 +38,7 @@ public function testRestSessionNoCookie()
2238
$this->_markTestAsRestOnly();
2339
/** @var $curlClient CurlClientWithCookies */
2440

25-
$curlClient = Bootstrap::getObjectManager()
41+
$curlClient = $this->objectManager
2642
->get(\Magento\TestFramework\TestCase\HttpClient\CurlClientWithCookies::class);
2743
$phpSessionCookieName =
2844
[

0 commit comments

Comments
 (0)