function WriteSafeSessionHandlerTest::setUpMockWrappedSessionHandler

Reinitializes the wrapped session handler as a mock object.

3 calls to WriteSafeSessionHandlerTest::setUpMockWrappedSessionHandler()
WriteSafeSessionHandlerTest::testConstructWriteSafeSessionHandlerDefaultArgs in core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php
Tests creating a WriteSafeSessionHandler with default arguments.
WriteSafeSessionHandlerTest::testOtherMethods in core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php
Tests that other invocations are passed unmodified to the wrapped handler.
WriteSafeSessionHandlerTest::testSetSessionWritable in core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php
Tests using setSessionWritable to enable/disable session writing.

File

core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php, line 47

Class

WriteSafeSessionHandlerTest
Tests \Drupal\Core\Session\WriteSafeSessionHandler.

Namespace

Drupal\Tests\Core\Session

Code

protected function setUpMockWrappedSessionHandler() : void {
  $this->wrappedSessionHandler = $this->createMock(\SessionHandlerInterface::class);
  $this->sessionHandler = new WriteSafeSessionHandler($this->wrappedSessionHandler);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.