$target =
$this->
createFile();
$fileRepository->
writeData('asdf',
$target->
getFileUri(), FileSystemInterface::EXISTS_REPLACE
);
} /**
* Tests loading a file by URI.
*
* @covers ::loadByUri
*/
public function testLoadByUri() { $source =
$this->
createFile();
$result =
$this->fileRepository->
loadByUri($source->
getFileUri());
$this->
assertSameFile($source,
$result);
} /**
* Tests loading a file by case-sensitive URI.
*
* @covers ::loadByUri
*/
public function testLoadByUriCaseSensitive() { $source =
$this->
createFile('FooBar.txt'
);
$result =
$this->fileRepository->
loadByUri('public://FooBar.txt'
);