本文整理汇总了PHP中Prophecy\Argument::withKey方法的典型用法代码示例。如果您正苦于以下问题:PHP Argument::withKey方法的具体用法?PHP Argument::withKey怎么用?PHP Argument::withKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Prophecy\Argument
的用法示例。
在下文中一共展示了Argument::withKey方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
function it_builds_a_form(FormBuilderInterface $builder)
{
$builder->add('first_item_cost', 'sylius_money', Argument::withKey('constraints'))->shouldBeCalled()->willReturn($builder);
$builder->add('additional_item_cost', 'sylius_money', Argument::withKey('constraints'))->shouldBeCalled()->willReturn($builder);
$builder->add('additional_item_limit', 'integer', Argument::withKey('constraints'))->shouldBeCalled()->willReturn($builder);
$this->buildForm($builder, array());
}
示例2:
function it_has_options(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(Argument::withKey('choice_list'))->shouldBeCalled()->willReturn($resolver);
$resolver->setRequired(array('option'))->shouldBeCalled()->willReturn($resolver);
$resolver->addAllowedTypes(array('option' => 'Sylius\\Component\\Variation\\Model\\OptionInterface'))->shouldBeCalled()->willReturn($resolver);
$this->setDefaultOptions($resolver);
}
示例3:
function it_has_options(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(Argument::withKey('class'))->shouldBeCalled()->willReturn($resolver);
$resolver->setNormalizers(Argument::withKey('class'))->shouldBeCalled()->willReturn($resolver);
$resolver->setDefaults(Argument::withKey('query_builder'))->shouldBeCalled()->willReturn($resolver);
$this->setDefaultOptions($resolver);
}
示例4:
function it_has_options(OptionsResolver $resolver)
{
$resolver->setDefaults(Argument::withKey('choice_list'))->shouldBeCalled()->willReturn($resolver);
$resolver->setRequired(array('option'))->shouldBeCalled()->willReturn($resolver);
$resolver->addAllowedTypes(array('option' => OptionInterface::class))->shouldBeCalled()->willReturn($resolver);
$this->configureOptions($resolver);
}
示例5: testAddHostIfNotPresent
public function testAddHostIfNotPresent()
{
$client = $this->getRiemannClient();
$logger = new Logger($client->reveal());
$logger->log([]);
$client->sendEvent(Argument::withKey('host'))->shouldHaveBeenCalled();
}
示例6:
function it_builds_form(FormBuilderInterface $builder)
{
$builder->add('method', 'sylius_payment_method_choice', Argument::type('array'))->willReturn($builder);
$builder->add('amount', 'sylius_money', Argument::type('array'))->willReturn($builder);
$builder->add('state', 'choice', Argument::withKey('choices'))->willReturn($builder);
$this->buildForm($builder, []);
}
示例7:
function it_has_options(OptionsResolver $resolver)
{
$resolver->setDefaults(Argument::withKey('class'))->shouldBeCalled()->willReturn($resolver);
$resolver->setNormalizer('class', Argument::type('callable'))->shouldBeCalled()->willReturn($resolver);
$resolver->setDefaults(Argument::withKey('query_builder'))->shouldBeCalled()->willReturn($resolver);
$this->configureOptions($resolver);
}
示例8:
function it_has_options(OptionsResolver $resolver)
{
$resolver->setDefaults(Argument::withKey('choice_list'))->shouldBeCalled()->willReturn($resolver);
$resolver->setRequired(['variable'])->shouldBeCalled()->willReturn($resolver);
$resolver->setAllowedTypes('variable', VariableInterface::class)->shouldBeCalled()->willReturn($resolver);
$this->configureOptions($resolver);
}
示例9: array
function it_has_options(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(Argument::withKey('choice_list'))->shouldBeCalled()->willReturn($resolver);
$resolver->setRequired(array('taxonomy', 'filter'))->shouldBeCalled()->willReturn($resolver);
$resolver->setAllowedTypes(array('taxonomy' => array('Sylius\\Component\\Taxonomy\\Model\\TaxonomyInterface'), 'filter' => array('\\Closure', 'null')))->shouldBeCalled()->willReturn($resolver);
$this->setDefaultOptions($resolver, array());
}
示例10: it_configures_options
public function it_configures_options(OptionsResolver $resolver)
{
$resolver->setDefaults(Argument::withKey('choice_list'))->shouldBeCalled()->willReturn($resolver);
$resolver->setDefined(Argument::type('array'))->shouldBeCalled()->willReturn($resolver);
$resolver->setAllowedTypes('subject', PaymentInterface::class)->shouldBeCalled()->willReturn($resolver);
$this->configureOptions($resolver);
}
示例11: array
function it_has_options(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(Argument::withKey('choice_list'))->shouldBeCalled()->willReturn($resolver);
$resolver->setOptional(array('subject'))->shouldBeCalled()->willReturn($resolver);
$resolver->setAllowedTypes(array('subject' => array('Sylius\\Component\\Shipping\\Model\\ShippingSubjectInterface'), 'criteria' => array('array')))->shouldBeCalled()->willReturn($resolver);
$this->setDefaultOptions($resolver);
}
示例12:
function it_builds_a_form(FormBuilderInterface $builder)
{
$builder->add('fixed', 'sylius_money', Argument::withKey('constraints'))->shouldBeCalled()->willReturn($builder);
$builder->add('variable', 'sylius_money', Argument::withKey('constraints'))->shouldBeCalled()->willReturn($builder);
$builder->add('division', 'number', Argument::withKey('constraints'))->shouldBeCalled()->willReturn($builder);
$this->buildForm($builder, []);
}
示例13:
function it_has_options(OptionsResolver $resolver, $metadata)
{
$metadata->getDriver()->willReturn(SyliusResourceBundle::DRIVER_DOCTRINE_ORM);
$resolver->setDefaults(Argument::withKey('class'))->shouldBeCalled()->willReturn($resolver);
$resolver->setNormalizer('class', Argument::type('callable'))->shouldBeCalled()->willReturn($resolver);
$resolver->setDefaults(Argument::withKey('query_builder'))->shouldBeCalled()->willReturn($resolver);
$this->configureOptions($resolver);
}
示例14:
function it_has_options(OptionsResolver $resolver)
{
$resolver->setDefaults(Argument::withKey('choice_list'))->shouldBeCalled()->willReturn($resolver);
$resolver->setDefined(['subject'])->shouldBeCalled()->willReturn($resolver);
$resolver->setAllowedTypes('subject', ShippingSubjectInterface::class)->shouldBeCalled()->willReturn($resolver);
$resolver->setAllowedTypes('criteria', 'array')->shouldBeCalled()->willReturn($resolver);
$this->configureOptions($resolver);
}
示例15: array
function it_has_options(OptionsResolver $resolver)
{
$resolver->setDefaults(Argument::withKey('choice_list'))->shouldBeCalled()->willReturn($resolver);
$resolver->setRequired(array('taxonomy', 'filter'))->shouldBeCalled()->willReturn($resolver);
$resolver->setAllowedTypes('taxonomy', TaxonomyInterface::class)->shouldBeCalled()->willReturn($resolver);
$resolver->setAllowedTypes('filter', ['callable', 'null'])->shouldBeCalled()->willReturn($resolver);
$this->configureOptions($resolver, array());
}