function FileDeleteRecursiveRemoteTest::testRealpathReturnsFalse

Same name and namespace in other branches
  1. main core/tests/Drupal/KernelTests/Core/File/FileDeleteRecursiveRemoteTest.php \Drupal\KernelTests\Core\File\FileDeleteRecursiveRemoteTest::testRealpathReturnsFalse()

Verifies the dummy-remote stream wrapper returns FALSE from realpath().

File

core/tests/Drupal/KernelTests/Core/File/FileDeleteRecursiveRemoteTest.php, line 37

Class

FileDeleteRecursiveRemoteTest
Tests deleteRecursive() with remote stream wrappers where realpath() is FALSE.

Namespace

Drupal\KernelTests\Core\File

Code

public function testRealpathReturnsFalse() : void {
  $uri = 'dummy-remote://test.txt';
  file_put_contents($uri, 'test');
  $this->assertFalse($this->container
    ->get('file_system')
    ->realpath($uri));
  unlink($uri);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.