public function ModuleFunctionsTest::testFlysystemFileDownloadFindsValidScheme in Flysystem 8
Same name and namespace in other branches
- 3.x tests/src/Unit/ModuleFunctionsTest.php \Drupal\Tests\flysystem\Unit\ModuleFunctionsTest::testFlysystemFileDownloadFindsValidScheme()
- 2.0.x tests/src/Unit/ModuleFunctionsTest.php \Drupal\Tests\flysystem\Unit\ModuleFunctionsTest::testFlysystemFileDownloadFindsValidScheme()
- 3.0.x tests/src/Unit/ModuleFunctionsTest.php \Drupal\Tests\flysystem\Unit\ModuleFunctionsTest::testFlysystemFileDownloadFindsValidScheme()
Tests flysystem_file_download() handles valid schemes.
File
- tests/
src/ Unit/ ModuleFunctionsTest.php, line 77
Class
- ModuleFunctionsTest
- Tests module functions.
Namespace
Drupal\Tests\flysystem\UnitCode
public function testFlysystemFileDownloadFindsValidScheme() {
file_put_contents('vfs://module_file/file.txt', '1234');
$return = flysystem_file_download('vfs://module_file/file.txt');
$this
->assertSame(2, count($return));
$this
->assertSame('txt/flysystem', $return['Content-Type']);
$this
->assertSame(4, $return['Content-Length']);
}