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