Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / web / core / modules / system / src / Tests / Session / StackSessionHandlerIntegrationTest.php
1 <?php
2
3 namespace Drupal\system\Tests\Session;
4
5 use Drupal\simpletest\WebTestBase;
6
7 /**
8  * Tests the stacked session handler functionality.
9  *
10  * @group Session
11  */
12 class StackSessionHandlerIntegrationTest extends WebTestBase {
13
14   /**
15    * Modules to enable.
16    *
17    * @var array
18    */
19   public static $modules = ['session_test'];
20
21   /**
22    * Tests a request.
23    */
24   public function testRequest() {
25     $actual_trace = $this->drupalGetAjax('session-test/trace-handler');
26     $expect_trace = [
27       ['BEGIN', 'test_argument', 'open'],
28       ['BEGIN', NULL, 'open'],
29       ['END', NULL, 'open'],
30       ['END', 'test_argument', 'open'],
31       ['BEGIN', 'test_argument', 'read', $this->sessionId],
32       ['BEGIN', NULL, 'read', $this->sessionId],
33       ['END', NULL, 'read', $this->sessionId],
34       ['END', 'test_argument', 'read', $this->sessionId],
35       ['BEGIN', 'test_argument', 'write', $this->sessionId],
36       ['BEGIN', NULL, 'write', $this->sessionId],
37       ['END', NULL, 'write', $this->sessionId],
38       ['END', 'test_argument', 'write', $this->sessionId],
39       ['BEGIN', 'test_argument', 'close'],
40       ['BEGIN', NULL, 'close'],
41       ['END', NULL, 'close'],
42       ['END', 'test_argument', 'close'],
43     ];
44     $this->assertEqual($expect_trace, $actual_trace);
45   }
46
47 }