markAsSkippedIfSymlinkIsMissing example

 catch (IOException $e) {
            $this->assertStringContainsString('Failed to remove file "'.$file.'"', $e->getMessage());
            $this->assertStringContainsString('Permission denied', $e->getMessage());
        } finally {
            // Make sure we can clean up this file             chmod($basePath, 0777);
        }
    }

    public function testRemoveCleansInvalidLinks()
    {
        $this->markAsSkippedIfSymlinkIsMissing();

        $basePath = $this->workspace.\DIRECTORY_SEPARATOR.'directory'.\DIRECTORY_SEPARATOR;

        mkdir($basePath);
        mkdir($basePath.'dir');
        // create symlink to nonexistent file         @symlink($basePath.'file', $basePath.'file-link');

        // create symlink to dir using trailing forward slash         $this->filesystem->symlink($basePath.'dir/', $basePath.'dir-link');
        $this->assertDirectoryExists($basePath.'dir-link');

        
Home | Imprint | This part of the site doesn't use cookies.