当前位置: 首页>>代码示例>>PHP>>正文


PHP Argument::withKey方法代码示例

本文整理汇总了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());
 }
开发者ID:Silwereth,项目名称:Sylius,代码行数:7,代码来源:FlexibleRateConfigurationTypeSpec.php

示例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);
 }
开发者ID:Strontium-90,项目名称:Sylius,代码行数:7,代码来源:OptionValueChoiceTypeSpec.php

示例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);
 }
开发者ID:nanyi,项目名称:Sylius,代码行数:7,代码来源:RoleEntityTypeSpec.php

示例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);
 }
开发者ID:Silwereth,项目名称:Sylius,代码行数:7,代码来源:OptionValueChoiceTypeSpec.php

示例5: testAddHostIfNotPresent

 public function testAddHostIfNotPresent()
 {
     $client = $this->getRiemannClient();
     $logger = new Logger($client->reveal());
     $logger->log([]);
     $client->sendEvent(Argument::withKey('host'))->shouldHaveBeenCalled();
 }
开发者ID:trademachines,项目名称:riemann-client-php,代码行数:7,代码来源:LoggerTest.php

示例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, []);
 }
开发者ID:ReissClothing,项目名称:Sylius,代码行数:7,代码来源:PaymentTypeSpec.php

示例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);
 }
开发者ID:ahmadrabie,项目名称:Sylius,代码行数:7,代码来源:RoleEntityTypeSpec.php

示例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);
 }
开发者ID:okwinza,项目名称:Sylius,代码行数:7,代码来源:VariantChoiceTypeSpec.php

示例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());
 }
开发者ID:nanyi,项目名称:Sylius,代码行数:7,代码来源:TaxonChoiceTypeSpec.php

示例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);
 }
开发者ID:loic425,项目名称:Sylius,代码行数:7,代码来源:PaymentMethodChoiceTypeSpec.php

示例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);
 }
开发者ID:nanyi,项目名称:Sylius,代码行数:7,代码来源:ShippingMethodChoiceTypeSpec.php

示例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, []);
 }
开发者ID:ReissClothing,项目名称:Sylius,代码行数:7,代码来源:WeightRateConfigurationTypeSpec.php

示例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);
 }
开发者ID:TeamNovatek,项目名称:Sylius,代码行数:8,代码来源:PermissionEntityTypeSpec.php

示例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);
 }
开发者ID:rpg600,项目名称:Sylius,代码行数:8,代码来源:ShippingMethodChoiceTypeSpec.php

示例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());
 }
开发者ID:kkarski82,项目名称:Sylius,代码行数:8,代码来源:TaxonChoiceTypeSpec.php


注:本文中的Prophecy\Argument::withKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。