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

testRenameThrowsExceptionIfTargetAlreadyExists() public method

    public function testRenameThrowsExceptionIfTargetAlreadyExists()
    {
        $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
        $newPath = $this->workspace . DIRECTORY_SEPARATOR . 'new_file';
        touch($file);
        touch($newPath);
        $this->filesystem->rename($file, $newPath);
    }
FilesystemTest