IndexTest.php 966 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\User\Controller\Adminhtml\Locks;
  7. class IndexTest extends \Magento\TestFramework\TestCase\AbstractBackendController
  8. {
  9. /**
  10. * Test index action
  11. *
  12. * @magentoDbIsolation enabled
  13. * @magentoDataFixture Magento/User/_files/locked_users.php
  14. */
  15. public function testIndexAction()
  16. {
  17. $this->dispatch('backend/admin/locks/index');
  18. $body = $this->getResponse()->getBody();
  19. $this->assertContains('<h1 class="page-title">Locked Users</h1>', $body);
  20. $this->assertRegExp(
  21. '/<td data-column\="username"\s*class\="\s*col-name\s*col-username\s*"\s*>\s*adminUser1\s*<\/td>/',
  22. $body
  23. );
  24. $this->assertRegExp(
  25. '/<td data-column\="username"\s*class\="\s*col-name\s*col-username\s*"\s*>\s*adminUser2\s*<\/td>/',
  26. $body
  27. );
  28. }
  29. }