RoleTest.php 788 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Authorization\Model;
  7. /**
  8. * @magentoAppArea adminhtml
  9. */
  10. class RoleTest extends \PHPUnit\Framework\TestCase
  11. {
  12. /**
  13. * @var \Magento\Authorization\Model\Role
  14. */
  15. protected $_model = null;
  16. protected function setUp()
  17. {
  18. $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
  19. ->create(\Magento\Authorization\Model\Role::class);
  20. }
  21. public function testGetRoleUsers()
  22. {
  23. $this->assertEmpty($this->_model->getRoleUsers());
  24. $this->_model->load(\Magento\TestFramework\Bootstrap::ADMIN_ROLE_NAME, 'role_name');
  25. $this->assertNotEmpty($this->_model->getRoleUsers());
  26. }
  27. }