本文整理汇总了PHP中Prophecy\Prophecy\ObjectProphecy::willImplement方法的典型用法代码示例。如果您正苦于以下问题:PHP ObjectProphecy::willImplement方法的具体用法?PHP ObjectProphecy::willImplement怎么用?PHP ObjectProphecy::willImplement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Prophecy\Prophecy\ObjectProphecy
的用法示例。
在下文中一共展示了ObjectProphecy::willImplement方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: prophesize
/**
* Creates new object prophecy.
*
* @param null|string $classOrInterface Class or interface name
*
* @return ObjectProphecy
*/
public function prophesize($classOrInterface = null)
{
$this->prophecies[] = $prophecy = new ObjectProphecy(new LazyDouble($this->doubler), new CallCenter($this->util), $this->revealer);
if ($classOrInterface && class_exists($classOrInterface)) {
return $prophecy->willExtend($classOrInterface);
}
if ($classOrInterface && interface_exists($classOrInterface)) {
return $prophecy->willImplement($classOrInterface);
}
return $prophecy;
}
示例3: implement
/**
* @param string $interface
*/
public function implement($interface)
{
$this->prophecy->willImplement($interface);
}