function FileRepositoryTest::testInvalidStreamWrapper
Same name in other branches
- 10 core/modules/file/tests/src/Kernel/FileRepositoryTest.php \Drupal\Tests\file\Kernel\FileRepositoryTest::testInvalidStreamWrapper()
- 11.x core/modules/file/tests/src/Kernel/FileRepositoryTest.php \Drupal\Tests\file\Kernel\FileRepositoryTest::testInvalidStreamWrapper()
Tests for an invalid stream wrapper.
@covers ::writeData
File
-
core/
modules/ file/ tests/ src/ Kernel/ FileRepositoryTest.php, line 171
Class
- FileRepositoryTest
- Tests the FileRepository.
Namespace
Drupal\Tests\file\KernelCode
public function testInvalidStreamWrapper() {
$this->expectException(InvalidStreamWrapperException::class);
$this->expectExceptionMessage('Invalid stream wrapper: foo://');
$this->fileRepository
->writeData('asdf', 'foo://');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.