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


PHP ObjectProphecy::getName方法代码示例

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


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

示例1: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->configEditor = $this->prophesize('ConsoleHelpers\\ConsoleKit\\Config\\ConfigEditor');
     $this->workingCopyResolver = $this->prophesize('ConsoleHelpers\\SVNBuddy\\Repository\\WorkingCopyResolver');
     $this->command = $this->prophesize('ConsoleHelpers\\SVNBuddy\\Command\\AbstractCommand');
     $this->command->willImplement('ConsoleHelpers\\SVNBuddy\\Command\\IConfigAwareCommand');
     $this->command->getName()->willReturn('sample-command');
     $this->commandConfig = new CommandConfig($this->configEditor->reveal(), $this->workingCopyResolver->reveal());
 }
开发者ID:console-helpers,项目名称:svn-buddy,代码行数:10,代码来源:CommandConfigTest.php

示例2: setUp

 public function setUp()
 {
     $this->processHelper = $this->getMock('Gush\\Helper\\ProcessHelper');
     $this->filesystemHelper = $this->prophesize('Gush\\Helper\\FilesystemHelper');
     $this->filesystemHelper->getName()->willReturn('filesystem');
     $this->gitConfigHelper = $this->prophesize('Gush\\Helper\\GitConfigHelper');
     $this->gitConfigHelper->setHelperSet(Argument::any());
     $this->gitConfigHelper->getName()->willReturn('git_config');
     $this->realFsHelper = new FilesystemHelper();
     $this->git = new GitHelper(new ProcessHelper(), $this->gitConfigHelper->reveal(), $this->realFsHelper);
     $this->unitGit = new GitHelper($this->processHelper, $this->gitConfigHelper->reveal(), $this->filesystemHelper->reveal());
 }
开发者ID:mistymagich,项目名称:gush,代码行数:12,代码来源:GitHelperTest.php

示例3: binds_and_renders

 /**
  * @test
  */
 public function binds_and_renders()
 {
     $this->input->setOption('test-option', 'test-option');
     $this->template->getName()->willReturn('test/foobar')->shouldBeCalled();
     $this->template->bind(['author' => 'cslucano'])->shouldBeCalled();
     $this->template->render()->willReturn('foo')->shouldBeCalled();
     $this->helper->registerTemplate($this->template->reveal());
     $res = $this->helper->bindAndRender(['author' => 'cslucano'], 'test', 'foobar');
     $this->assertEquals('foo', $res);
 }
开发者ID:mistymagich,项目名称:gush,代码行数:13,代码来源:TemplateHelperTest.php

示例4: configureSubject

 public static function configureSubject(ObjectProphecy $subject, array $options = array())
 {
     $options = array_merge(array('iterations' => 1, 'name' => 'benchFoo', 'beforeMethods' => array(), 'afterMethods' => array(), 'parameterSets' => array(array(array())), 'groups' => array(), 'revs' => 1, 'notApplicable' => false, 'skip' => false, 'sleep' => 0, 'paramProviders' => array(), 'outputTimeUnit' => 'microseconds'), $options);
     $subject->getIterations()->willReturn($options['iterations']);
     $subject->getSleep()->willReturn($options['sleep']);
     $subject->getName()->willReturn($options['name']);
     $subject->getBeforeMethods()->willReturn($options['beforeMethods']);
     $subject->getAfterMethods()->willReturn($options['afterMethods']);
     $subject->getParameterSets()->willReturn($options['parameterSets']);
     $subject->getGroups()->willReturn($options['groups']);
     $subject->getRevs()->willReturn($options['revs']);
     $subject->getSkip()->willReturn($options['skip']);
     $subject->getParamProviders()->willReturn($options['paramProviders']);
     $subject->getOutputTimeUnit()->willReturn($options['outputTimeUnit']);
 }
开发者ID:stof,项目名称:phpbench,代码行数:15,代码来源:TestUtil.php

示例5: setUp

 protected function setUp()
 {
     $typeName = Cache::TYPE_NAME;
     $this->type = $this->prophesize('\\Elastica\\Type');
     $this->type->request(Argument::any(), Argument::cetera())->willReturn(true);
     $this->type->getName()->willReturn($typeName);
     $this->index = $this->prophesize('\\Elastica\\Index');
     $this->index->getType($typeName)->willReturn($this->type->reveal());
     $this->index->exists()->willReturn(true);
     $nsDoc = new Document('DoctrineNamespaceCacheKey[]', [Cache::VALUE_FIELD => serialize($this->namespaceId)]);
     $this->type->getIndex()->willReturn($this->index->reveal());
     $this->type->getDocument("DoctrineNamespaceCacheKey[]")->willReturn($nsDoc);
     $this->client = $this->prophesize('\\Elastica\\Client');
     $this->client->getIndex($this->indexName)->willReturn($this->index->reveal());
     $this->cache = new Cache($this->client->reveal(), ['index' => $this->indexName]);
 }
开发者ID:basster,项目名称:doctrine-elastica-cache,代码行数:16,代码来源:CacheTest.php

示例6: testNoSupports

 public function testNoSupports()
 {
     $this->requestMock->getName()->willReturn('foo')->shouldBeCalledTimes(1);
     $this->assertFalse($this->parser->supports($this->requestMock->reveal()));
 }
开发者ID:api-platform,项目名称:postman-collection-generator,代码行数:5,代码来源:NameRequestParserTest.php


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