GroupTest.php 990 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Customer\Model;
  7. class GroupTest extends \PHPUnit\Framework\TestCase
  8. {
  9. /**
  10. * @var \Magento\Customer\Model\Group
  11. */
  12. protected $groupModel;
  13. /**
  14. * @var \Magento\Customer\Api\Data\GroupInterfaceFactory
  15. */
  16. protected $groupFactory;
  17. protected function setUp()
  18. {
  19. $this->groupModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
  20. \Magento\Customer\Model\Group::class
  21. );
  22. $this->groupFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
  23. \Magento\Customer\Api\Data\GroupInterfaceFactory::class
  24. );
  25. }
  26. public function testCRUD()
  27. {
  28. $this->groupModel->setCode('test');
  29. $crud = new \Magento\TestFramework\Entity($this->groupModel, ['customer_group_code' => uniqid()]);
  30. $crud->testCrud();
  31. }
  32. }