LogoutAllTest.php 866 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Security\Controller\Adminhtml\Session;
  7. class LogoutAllTest extends \Magento\TestFramework\TestCase\AbstractBackendController
  8. {
  9. /**
  10. * Set up
  11. */
  12. protected function setUp()
  13. {
  14. $this->uri = 'backend/security/session/logoutAll';
  15. parent::setUp();
  16. }
  17. /**
  18. * logoutAllAction test
  19. */
  20. public function testLogoutAllAction()
  21. {
  22. $this->dispatch('backend/security/session/logoutAll');
  23. $this->assertSessionMessages(
  24. $this->equalTo(['All other open sessions for this account were terminated.']),
  25. \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS
  26. );
  27. $this->assertRedirect($this->stringContains('security/session/activity'));
  28. }
  29. }