本文整理匯總了PHP中Prophecy\Prophecy\ObjectProphecy::getParameter方法的典型用法代碼示例。如果您正苦於以下問題:PHP ObjectProphecy::getParameter方法的具體用法?PHP ObjectProphecy::getParameter怎麽用?PHP ObjectProphecy::getParameter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Prophecy\Prophecy\ObjectProphecy
的用法示例。
在下文中一共展示了ObjectProphecy::getParameter方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: containerHasParameter
public static function containerHasParameter(ObjectProphecy $container, $name, $value)
{
$container->hasParameter($name)->willReturn(true);
$container->getParameter($name)->willReturn($value);
}
示例2: getParameterDelegatesToConcreteQueryBuilder
/**
* @test
*/
public function getParameterDelegatesToConcreteQueryBuilder()
{
$this->concreteQueryBuilder->getParameter(Argument::exact('aField'))->shouldBeCalled()->willReturn('aValue');
$this->subject->getParameter('aField');
}
示例3: testRetrieveDependencyWithUnknownDependency
/**
* @covers ::retrieveDependency
* @covers ::__construct
*
* @expectedException \BartFeenstra\DependencyRetriever\Exception\UnknownDependencyException
*/
public function testRetrieveDependencyWithUnknownDependency()
{
$this->container->getParameter('known_dependency')->willThrow(new \InvalidArgumentException());
$this->sut->retrieveDependency('known_dependency');
}
開發者ID:bartfeenstra,項目名稱:dependency-retriever-symfony-bridge,代碼行數:11,代碼來源:ContainerParameterRetrieverTest.php