当前位置: 首页>>代码示例>>PHP>>正文


PHP ObjectProphecy::getWorkingCopyUrl方法代码示例

本文整理汇总了PHP中Prophecy\Prophecy\ObjectProphecy::getWorkingCopyUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP ObjectProphecy::getWorkingCopyUrl方法的具体用法?PHP ObjectProphecy::getWorkingCopyUrl怎么用?PHP ObjectProphecy::getWorkingCopyUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Prophecy\Prophecy\ObjectProphecy的用法示例。


在下文中一共展示了ObjectProphecy::getWorkingCopyUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testGetWorkingCopyUrlFromPath

 public function testGetWorkingCopyUrlFromPath()
 {
     $this->createTempFolder();
     $this->connector->isUrl($this->tempFolder)->willReturn(false);
     $this->connector->isWorkingCopy($this->tempFolder)->willReturn(true);
     $this->connector->getWorkingCopyUrl($this->tempFolder)->willReturn('svn://repository.com');
     $this->assertEquals('svn://repository.com', $this->workingCopyResolver->getWorkingCopyUrl($this->tempFolder), 'Cache Miss');
     $this->assertEquals('svn://repository.com', $this->workingCopyResolver->getWorkingCopyUrl($this->tempFolder), 'Cache Hit');
 }
开发者ID:console-helpers,项目名称:svn-buddy,代码行数:9,代码来源:WorkingCopyResolverTest.php

示例2: prepareMergeResult

 protected function prepareMergeResult()
 {
     $this->connector->getFreshMergedRevisions('/path/to/working-copy')->willReturn(array('/projects/project-name/trunk' => array('18', '33'), '/projects/project-name/branches/branch-name' => array('4')));
     $this->connector->getWorkingCopyUrl('/path/to/working-copy')->willReturn('svn://repository.com/path/to/project/tags/stable');
     $this->connector->getRootUrl('svn://repository.com/path/to/project/tags/stable')->willReturn('svn://repository.com');
     $revision_log1 = $this->getRevisionLog('svn://repository.com/projects/project-name/trunk');
     $revision_log1->getRevisionsData('summary', array(18, 33))->willReturn(array(18 => array('author' => 'user1', 'date' => 3534535353, 'msg' => 'a-line1' . PHP_EOL . 'a-line2' . PHP_EOL . PHP_EOL), 33 => array('author' => 'user2', 'date' => 35345445353, 'msg' => 'b-line1' . PHP_EOL . 'b-line2' . PHP_EOL . PHP_EOL)));
     $revision_log2 = $this->getRevisionLog('svn://repository.com/projects/project-name/branches/branch-name');
     $revision_log2->getRevisionsData('summary', array(4))->willReturn(array(4 => array('author' => 'user2', 'date' => 35345444353, 'msg' => 'c-line1' . PHP_EOL . 'c-line2' . PHP_EOL . PHP_EOL)));
 }
开发者ID:console-helpers,项目名称:svn-buddy,代码行数:10,代码来源:AbstractMergeTemplateTestCase.php

示例3: testSetWorkingCopySetting

 public function testSetWorkingCopySetting()
 {
     $this->configEditor->get('global-settings.sample_name', '')->willReturn('global_value');
     $setting_name = 'path-settings[svn://localhost].sample_name';
     $this->configEditor->get($setting_name)->willReturn('old_value');
     $this->configEditor->set($setting_name, 'new_value')->will(function (array $args, $object) {
         $object->get($args[0])->willReturn($args[1]);
     });
     $this->command->getConfigSettings()->willReturn(array(new StringConfigSetting('sample_name', '', AbstractConfigSetting::SCOPE_WORKING_COPY)));
     $this->workingCopyResolver->getWorkingCopyUrl('/path/to/working-copy')->willReturn('svn://localhost');
     $this->commandConfig->setSettingValue('sample_name', $this->command->reveal(), '/path/to/working-copy', 'new_value');
     $this->assertEquals('new_value', $this->commandConfig->getSettingValue('sample_name', $this->command->reveal(), '/path/to/working-copy'));
 }
开发者ID:console-helpers,项目名称:svn-buddy,代码行数:13,代码来源:CommandConfigTest.php


注:本文中的Prophecy\Prophecy\ObjectProphecy::getWorkingCopyUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。