Skip to content
Snippets Groups Projects
Select Git revision
  • e89076aae2a9086b30bd457859b40bec0a839e28
  • 11.x default protected
  • 11.2.x protected
  • 10.6.x protected
  • 10.5.x protected
  • 11.1.x protected
  • 10.4.x protected
  • 11.0.x protected
  • 10.3.x protected
  • 7.x protected
  • 10.2.x protected
  • 10.1.x protected
  • 9.5.x protected
  • 10.0.x protected
  • 9.4.x protected
  • 9.3.x protected
  • 9.2.x protected
  • 9.1.x protected
  • 8.9.x protected
  • 9.0.x protected
  • 8.8.x protected
  • 10.5.1 protected
  • 11.2.2 protected
  • 11.2.1 protected
  • 11.2.0 protected
  • 10.5.0 protected
  • 11.2.0-rc2 protected
  • 10.5.0-rc1 protected
  • 11.2.0-rc1 protected
  • 10.4.8 protected
  • 11.1.8 protected
  • 10.5.0-beta1 protected
  • 11.2.0-beta1 protected
  • 11.2.0-alpha1 protected
  • 10.4.7 protected
  • 11.1.7 protected
  • 10.4.6 protected
  • 11.1.6 protected
  • 10.3.14 protected
  • 10.4.5 protected
  • 11.0.13 protected
41 results

StackSessionHandlerIntegrationTest.php

Blame
  • Alex Pott's avatar
    Issue #2372389 by znerol, almaudoh: Expose session handler in container
    Alex Pott authored
    a32a88cb
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    StackSessionHandlerIntegrationTest.php 1.35 KiB
    <?php
    
    /**
     * @file
     * Contains \Drupal\system\Tests\Session\StackSessionHandlerIntegrationTest.
     */
    
    namespace Drupal\system\Tests\Session;
    
    use Drupal\simpletest\WebTestBase;
    
    /**
     * Tests the stacked session handler functionality.
     *
     * @group Session
     */
    class StackSessionHandlerIntegrationTest extends WebTestBase {
    
      /**
       * Modules to enable.
       *
       * @var array
       */
      public static $modules = array('session_test');
    
      /**
       * Tests a request.
       */
      public function testRequest() {
        $actual_trace = $this->drupalGetAjax('session-test/trace-handler');
        $expect_trace = [
          ['BEGIN', 'test_argument', 'open'],
          ['BEGIN', NULL, 'open'],
          ['END', NULL, 'open'],
          ['END', 'test_argument', 'open'],
          ['BEGIN', 'test_argument', 'read', $this->sessionId],
          ['BEGIN', NULL, 'read', $this->sessionId],
          ['END', NULL, 'read', $this->sessionId],
          ['END', 'test_argument', 'read', $this->sessionId],
          ['BEGIN', 'test_argument', 'write', $this->sessionId],
          ['BEGIN', NULL, 'write', $this->sessionId],
          ['END', NULL, 'write', $this->sessionId],
          ['END', 'test_argument', 'write', $this->sessionId],
          ['BEGIN', 'test_argument', 'close'],
          ['BEGIN', NULL, 'close'],
          ['END', NULL, 'close'],
          ['END', 'test_argument', 'close'],
        ];
        $this->assertEqual($expect_trace, $actual_trace);
      }
    
    }