Skip to content

Commit

Permalink
Corrects for Test.
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Kilo committed May 22, 2020
1 parent fe0bd17 commit ac0dea5
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace Magento\Webapi;

use Magento\Framework\Module\Manager;
use Magento\TestFramework\Helper\Bootstrap;

/**
Expand All @@ -14,6 +15,21 @@
class RestSessionCookieTest extends \Magento\TestFramework\TestCase\WebapiAbstract
{

private $moduleManager;
private $objectManager;

/**
* @inheritdoc
*/
protected function setUp(): void
{
$this->objectManager = Bootstrap::getObjectManager();
$this->moduleManager = $this->objectManager->get(Manager::class);
if ($this->moduleManager->isEnabled('Magento_B2b')) {
$this->markTestSkipped('Skipped, because this logic is rewritten on B2B.');
}
}

/**
* Check for non exist cookie PHPSESSID
*/
Expand All @@ -22,7 +38,7 @@ public function testRestSessionNoCookie()
$this->_markTestAsRestOnly();
/** @var $curlClient CurlClientWithCookies */

$curlClient = Bootstrap::getObjectManager()
$curlClient = $this->objectManager
->get(\Magento\TestFramework\TestCase\HttpClient\CurlClientWithCookies::class);
$phpSessionCookieName =
[
Expand Down

0 comments on commit ac0dea5

Please sign in to comment.