function FileRepositoryTest::testLoadByUriCaseSensitive
Same name in other branches
- 10 core/modules/file/tests/src/Kernel/FileRepositoryTest.php \Drupal\Tests\file\Kernel\FileRepositoryTest::testLoadByUriCaseSensitive()
- 11.x core/modules/file/tests/src/Kernel/FileRepositoryTest.php \Drupal\Tests\file\Kernel\FileRepositoryTest::testLoadByUriCaseSensitive()
Tests loading a file by case-sensitive URI.
@covers ::loadByUri
File
-
core/
modules/ file/ tests/ src/ Kernel/ FileRepositoryTest.php, line 218
Class
- FileRepositoryTest
- Tests the FileRepository.
Namespace
Drupal\Tests\file\KernelCode
public function testLoadByUriCaseSensitive() {
$source = $this->createFile('FooBar.txt');
$result = $this->fileRepository
->loadByUri('public://FooBar.txt');
$this->assertSameFile($source, $result);
$result = $this->fileRepository
->loadByUri('public://foobar.txt');
$this->assertNull($result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.