Test for Magento\Customer\Model\GroupManagement
Definition at line 15 of file GroupManagementTest.php.
◆ setUp()
Definition at line 27 of file GroupManagementTest.php.
30 $this->groupManagement = $this->objectManager->get(\
Magento\Customer\Api\GroupManagementInterface::class);
static getObjectManager()
◆ testGetAllGroup()
Definition at line 104 of file GroupManagementTest.php.
106 $allGroup = $this->groupManagement->getAllCustomersGroup();
107 $this->assertEquals(32000, $allGroup->getId());
◆ testGetDefaultGroupWithInvalidStoreId()
testGetDefaultGroupWithInvalidStoreId |
( |
| ) |
|
@expectedException \Magento\Framework\Exception\NoSuchEntityException
Definition at line 68 of file GroupManagementTest.php.
71 $this->groupManagement->getDefaultGroup(
$storeId);
◆ testGetDefaultGroupWithStoreId()
testGetDefaultGroupWithStoreId |
( |
|
$testGroup, |
|
|
|
$storeId |
|
) |
| |
- Parameters
-
$testGroup | |
$storeId | @dataProvider getDefaultGroupDataProvider |
Definition at line 39 of file GroupManagementTest.php.
41 $this->assertDefaultGroupMatches($testGroup,
$storeId);
◆ testGetLoggedInGroups()
testGetLoggedInGroups |
( |
| ) |
|
Definition at line 95 of file GroupManagementTest.php.
97 $loggedInGroups = $this->groupManagement->getLoggedInGroups();
98 foreach ($loggedInGroups as
$group) {
◆ testGetNotLoggedInGroup()
testGetNotLoggedInGroup |
( |
| ) |
|
◆ testIsReadonlyWithGroupId()
testIsReadonlyWithGroupId |
( |
| ) |
|
Definition at line 74 of file GroupManagementTest.php.
76 $testGroup = [
'id' => 3,
'code' =>
'General',
'tax_class_id' => 3,
'tax_class_name' =>
'Retail Customer'];
77 $this->assertEquals(
false, $this->groupManagement->isReadonly($testGroup[
'id']));
◆ testIsReadonlyWithInvalidGroupId()
testIsReadonlyWithInvalidGroupId |
( |
| ) |
|
@expectedException \Magento\Framework\Exception\NoSuchEntityException
Definition at line 83 of file GroupManagementTest.php.
85 $testGroup = [
'id' => 4,
'code' =>
'General',
'tax_class_id' => 3,
'tax_class_name' =>
'Retail Customer'];
86 $this->groupManagement->isReadonly($testGroup[
'id']);
◆ $groupManagement
◆ $objectManager
The documentation for this class was generated from the following file: