本文整理匯總了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);
}