Mercurial > hg > isophonics-drupal-site
diff core/modules/system/src/Tests/Session/StackSessionHandlerIntegrationTest.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/modules/system/src/Tests/Session/StackSessionHandlerIntegrationTest.php Wed Nov 29 16:09:58 2017 +0000 @@ -0,0 +1,47 @@ +<?php + +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 = ['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); + } + +}