function FileSystemTest::testChmodUnsuccessful

Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/File/FileSystemTest.php \Drupal\Tests\Core\File\FileSystemTest::testChmodUnsuccessful()
  2. 10 core/tests/Drupal/Tests/Core/File/FileSystemTest.php \Drupal\Tests\Core\File\FileSystemTest::testChmodUnsuccessful()
  3. 11.x core/tests/Drupal/Tests/Core/File/FileSystemTest.php \Drupal\Tests\Core\File\FileSystemTest::testChmodUnsuccessful()

@covers ::chmod

File

core/tests/Drupal/Tests/Core/File/FileSystemTest.php, line 81

Class

FileSystemTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21File%21FileSystem.php/class/FileSystem/9" title="Provides helpers to operate on files and stream wrappers." class="local">\Drupal\Core\File\FileSystem</a>

Namespace

Drupal\Tests\Core\File

Code

public function testChmodUnsuccessful() {
    vfsStream::setup('dir');
    $this->logger
        ->expects($this->once())
        ->method('error');
    $this->assertFalse($this->fileSystem
        ->chmod('vfs://dir/test.txt'));
}

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