Skip to content
Snippets Groups Projects
Select Git revision
  • 8.x-2.x
  • 3.x default
  • 3.0.x
  • 7.x-1.x
  • order-comments
  • 3.1.0
  • 3.0.2
  • 3.0.1
  • 3.0.0
  • 3.0.0-beta2
  • 3.0.0-beta1
  • 3.0.0-alpha1
  • 8.x-2.40
  • 8.x-2.39
  • 8.x-2.38
  • 8.x-2.37
  • 8.x-2.36
  • 8.x-2.35
  • 8.x-2.34
  • 8.x-2.33
  • 8.x-2.32
  • 8.x-2.31
  • 8.x-2.30
  • 7.x-1.17
  • 8.x-2.29
25 results

README.md

Blame
  • 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);
      }
    
    }