You are here

public function MockSessionTrait::getSessionHelper in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/stream_wrapper_example/tests/src/Traits/MockSessionTrait.php \Drupal\Tests\stream_wrapper_example\Traits\MockSessionTrait::getSessionHelper()

Get a session helper.

2 calls to MockSessionTrait::getSessionHelper()
StreamWrapperTest::getCurrentStore in stream_wrapper_example/tests/src/Kernel/StreamWrapperTest.php
Get the contents of the complete array stored in the session.
StreamWrapperTest::resetStore in stream_wrapper_example/tests/src/Kernel/StreamWrapperTest.php
Clear the session storage area.

File

stream_wrapper_example/tests/src/Traits/MockSessionTrait.php, line 76

Class

MockSessionTrait
A trait to expose a mock session type to PHPUnit tests.

Namespace

Drupal\Tests\stream_wrapper_example\Traits

Code

public function getSessionHelper() {
  return new SessionHelper($this->requestStack);
}