Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-webapi
Test
Unit
Model
Authorization
GuestUserContextTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Webapi\Test\Unit\Model\Authorization
;
8
9
use
Magento\Authorization\Model\UserContextInterface
;
10
14
class
GuestUserContextTest
extends
\PHPUnit\Framework\TestCase
15
{
19
protected
$objectManager
;
20
24
protected
$guestUserContext
;
25
26
protected
function
setUp
()
27
{
28
$this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
29
30
$this->guestUserContext = $this->objectManager->getObject(
31
\
Magento
\
Webapi
\Model\Authorization\GuestUserContext::class
32
);
33
}
34
35
public
function
testGetUserId
()
36
{
37
$this->assertEquals(
null
, $this->guestUserContext->getUserId());
38
}
39
40
public
function
testGetUserType
()
41
{
42
$this->assertEquals(
UserContextInterface::USER_TYPE_GUEST
, $this->guestUserContext->getUserType());
43
}
44
}
Magento\Authorization\Model\UserContextInterface\USER_TYPE_GUEST
const USER_TYPE_GUEST
Definition:
UserContextInterface.php:23
Magento\Webapi\Test\Unit\Model\Authorization\GuestUserContextTest\$objectManager
$objectManager
Definition:
GuestUserContextTest.php:19
Magento\Webapi\Test\Unit\Model\Authorization\GuestUserContextTest\testGetUserType
testGetUserType()
Definition:
GuestUserContextTest.php:40
Magento\Authorization\Model\UserContextInterface
Definition:
UserContextInterface.php:15
Magento\Webapi\Test\Unit\Model\Authorization\GuestUserContextTest\testGetUserId
testGetUserId()
Definition:
GuestUserContextTest.php:35
Magento\Webapi\Test\Unit\Model\Authorization\GuestUserContextTest\$guestUserContext
$guestUserContext
Definition:
GuestUserContextTest.php:24
Magento
Magento\Webapi\Test\Unit\Model\Authorization\GuestUserContextTest
Definition:
GuestUserContextTest.php:14
Magento\Webapi\Model\Cache\Type\Webapi
Definition:
Webapi.php:14
Magento\Webapi\Test\Unit\Model\Authorization
Definition:
GuestUserContextTest.php:7
Magento\Webapi\Test\Unit\Model\Authorization\GuestUserContextTest\setUp
setUp()
Definition:
GuestUserContextTest.php:26