Symfony\Component\Filesystem\Tests\FilesystemTest::testCopyShouldKeepExecutionPermission PHP Method

testCopyShouldKeepExecutionPermission() public method

    public function testCopyShouldKeepExecutionPermission()
    {
        $this->markAsSkippedIfChmodIsMissing();
        $sourceFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_source_file';
        $targetFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_target_file';
        file_put_contents($sourceFilePath, 'SOURCE FILE');
        chmod($sourceFilePath, 0745);
        $this->filesystem->copy($sourceFilePath, $targetFilePath);
        $this->assertFilePermissions(767, $targetFilePath);
    }
FilesystemTest