UserTest.php 864 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\User\Block\Role\Grid;
  7. /**
  8. * @magentoAppArea adminhtml
  9. */
  10. class UserTest extends \PHPUnit\Framework\TestCase
  11. {
  12. /**
  13. * @var \Magento\User\Block\Role\Grid\User
  14. */
  15. protected $_block;
  16. protected function setUp()
  17. {
  18. $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
  19. \Magento\Framework\View\LayoutInterface::class
  20. );
  21. $this->_block = $layout->createBlock(\Magento\User\Block\Role\Grid\User::class);
  22. }
  23. public function testPreparedCollection()
  24. {
  25. $this->_block->toHtml();
  26. $this->assertInstanceOf(
  27. \Magento\User\Model\ResourceModel\Role\User\Collection::class,
  28. $this->_block->getCollection()
  29. );
  30. }
  31. }