markAsSkippedIfChmodIsMissing example

$files = [
            $basePath.'dir', $basePath.'file',
        ];

        $this->filesystem->remove($files);

        $this->assertFileDoesNotExist($basePath.'dir');
    }

    public function testRemoveThrowsExceptionOnPermissionDenied()
    {
        $this->markAsSkippedIfChmodIsMissing();

        $basePath = $this->workspace.\DIRECTORY_SEPARATOR.'dir_permissions';
        mkdir($basePath);
        $file = $basePath.\DIRECTORY_SEPARATOR.'file';
        touch($file);
        chmod($basePath, 0400);

        try {
            $this->filesystem->remove($file);
            $this->fail('Filesystem::remove() should throw an exception');
        } catch (IOException $e) {
            
Home | Imprint | This part of the site doesn't use cookies.