function StreamWrapperTest::setUp
Same name in other branches
- 8.x-1.x stream_wrapper_example/tests/src/Kernel/StreamWrapperTest.php \Drupal\Tests\stream_wrapper_example\Kernel\StreamWrapperTest::setUp()
- 4.0.x modules/stream_wrapper_example/tests/src/Kernel/StreamWrapperTest.php \Drupal\Tests\stream_wrapper_example\Kernel\StreamWrapperTest::setUp()
Overrides KernelTestBase::setUp
File
-
modules/
stream_wrapper_example/ tests/ src/ Kernel/ StreamWrapperTest.php, line 37
Class
- StreamWrapperTest
- Test of the Session Stream Wrapper Class.
Namespace
Drupal\Tests\stream_wrapper_example\KernelCode
protected function setUp() : void {
parent::setUp();
// We use a mock session here so that our session-based stream wrapper is
// able to operate. Kernel tests don't normally have a logged-in user, so
// we mock one.
$this->container
->set('request_stack', $this->createSessionMock());
}