本文整理汇总了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());
}
示例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());
}
示例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);
}
示例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']);
}
示例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]);
}
示例6: testNoSupports
public function testNoSupports()
{
$this->requestMock->getName()->willReturn('foo')->shouldBeCalledTimes(1);
$this->assertFalse($this->parser->supports($this->requestMock->reveal()));
}