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


PHP Argument::not方法代码示例

本文整理汇总了PHP中Prophecy\Argument::not方法的典型用法代码示例。如果您正苦于以下问题:PHP Argument::not方法的具体用法?PHP Argument::not怎么用?PHP Argument::not使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Prophecy\Argument的用法示例。


在下文中一共展示了Argument::not方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 function it_supports_denormalization_in_csv_of_a_family()
 {
     $this->supportsDenormalization([], self::ENTITY_CLASS, self::FORMAT_CSV)->shouldBe(true);
     $this->supportsDenormalization([], Argument::not(self::ENTITY_CLASS), self::FORMAT_CSV)->shouldBe(false);
     $this->supportsDenormalization([], self::ENTITY_CLASS, Argument::not(self::FORMAT_CSV))->shouldBe(false);
     $this->supportsDenormalization([], Argument::not(self::ENTITY_CLASS), Argument::not(self::FORMAT_CSV))->shouldBe(false);
 }
开发者ID:abdeldayem,项目名称:pim-community-dev,代码行数:7,代码来源:FamilyDenormalizerSpec.php

示例2:

 function it_provides_the_color_and_font_color_for_the_given_channel($manager, ChannelInterface $channel, $colorsProvider)
 {
     $manager->getChannelByCode(Argument::not(null))->willReturn($channel);
     $channel->getColor()->willReturn('blue');
     $colorsProvider->getColorCode('blue')->willReturn('0,31,63,.4');
     $colorsProvider->getFontColor('blue')->willReturn('#ccc');
     $this->channelColor('test')->shouldReturn('0,31,63,.4');
     $this->channelFontColor('test')->shouldReturn('#ccc');
 }
开发者ID:ashutosh-srijan,项目名称:findit_akeneo,代码行数:9,代码来源:ChannelExtensionSpec.php

示例3:

 function it_does_not_mark_order_as_fulfilled_when_it_has_been_shipped_but_not_paid(FactoryInterface $stateMachineFactory, OrderInterface $order, StateMachineInterface $stateMachine)
 {
     $order->getShippingState()->willReturn(OrderShippingStates::STATE_SHIPPED);
     $order->getPaymentState()->willReturn(Argument::not(OrderPaymentStates::STATE_PAID));
     $stateMachineFactory->get($order, OrderTransitions::GRAPH)->willReturn($stateMachine);
     $stateMachine->can(OrderTransitions::TRANSITION_FULFILL)->willReturn(true);
     $stateMachine->apply(OrderTransitions::TRANSITION_FULFILL)->shouldNotBeCalled();
     $this->resolve($order);
 }
开发者ID:gabiudrescu,项目名称:Sylius,代码行数:9,代码来源:OrderStateResolverSpec.php

示例4:

 function it_uses_merged_definition_if_default_definition_exists_to_build_Token(TokenDefinition $defaultDefinition, TokenDefinition $definition, TokenDefinition $mergedDefinition, Token $token, TokenBuilder $builder)
 {
     $type = 'type';
     $defaultDefinition->merge($definition)->willReturn($mergedDefinition);
     $definition->getType()->willReturn($type);
     /**
      * $definition is created based on CLONED version of original, so it is not possible to
      * check if object passed as an argument is exactly the same. It is possible to checks
      * that it is not the usual one ($definition)
      */
     $builder->build(a::not($definition))->willReturn($token);
     $this->beConstructedWith($builder);
     $this->setDefaultDefinition($defaultDefinition)->addDefinition($definition)->build($type);
 }
开发者ID:devhelp,项目名称:token,代码行数:14,代码来源:TokenDirectorSpec.php

示例5:

 function it_does_not_change_object_media_because_the_image_does_not_be_an_media(ObjectEvent $event, ObjectStub $object)
 {
     $event->getObject()->shouldBeCalled()->willReturn($object);
     $object->getImage()->shouldBeCalled()->willReturn(Argument::not('Kreta\\Component\\Core\\Model\\Media'));
     $this->onChangeObjectMedia($event);
 }
开发者ID:cespedosa,项目名称:kreta,代码行数:6,代码来源:MediaUrlSubscriberSpec.php

示例6:

 function it_does_not_support_other_normalizations(CategoryInterface $category)
 {
     $this->supportsNormalization($category, 'csv')->shouldReturn(false);
     $this->supportsNormalization(Argument::not($category), 'xml')->shouldReturn(false);
     $this->supportsNormalization(Argument::not($category), 'json')->shouldReturn(false);
 }
开发者ID:Sylake,项目名称:Sylakim,代码行数:6,代码来源:CategoryNormalizerSpec.php

示例7:

 function it_processes_the_order(OrderUpdaterInterface $orderUpdater, OrderInterface $order)
 {
     $order->getState()->willReturn(Argument::not(OrderInterface::STATE_CANCELLED));
     $orderUpdater->update($order)->shouldBeCalled();
     $this->process($order);
 }
开发者ID:ReissClothing,项目名称:Sylius,代码行数:6,代码来源:OrderExchangeRateProcessorSpec.php

示例8:

 function it_does_not_support_other_normalizations(AbstractAttribute $attribute)
 {
     $this->supportsNormalization($attribute, 'csv')->shouldReturn(false);
     $this->supportsNormalization(Argument::not($attribute), 'xml')->shouldReturn(false);
     $this->supportsNormalization(Argument::not($attribute), 'json')->shouldReturn(false);
 }
开发者ID:Sylake,项目名称:Sylakim,代码行数:6,代码来源:AttributeNormalizerSpec.php

示例9: it_should_skip_some_options_by_default

 /**
  * @test
  * it should skip some options by default
  * @dataProvider skippedOptions
  */
 public function it_should_skip_some_options_by_default($option)
 {
     $this->config[$option] = true;
     $this->executor->exec(Argument::not(Argument::containingString('--' . $option)), Argument::any(), Argument::any())->shouldBeCalled();
     $sut = $this->make_instance();
     $sut->cli('core version');
 }
开发者ID:lucatume,项目名称:wp-browser,代码行数:12,代码来源:WPCLITest.php

示例10: getTestChapterTemplates

 /**
  * @return ChapterTemplate[]
  */
 private function getTestChapterTemplates()
 {
     $startCondition = $this->prophesize(MessageCondition::class);
     $startCondition->isTrueFor(Argument::type(FileWasUploaded::class))->willReturn(true);
     $startCondition->isTrueFor(Argument::not(Argument::type(FileWasUploaded::class)))->willReturn(false);
     $isDoneCondition = $this->prophesize(MessageCondition::class);
     $isDoneCondition->isTrueFor(Argument::type(FileWasProcessed::class))->willReturn(true);
     $isDoneCondition->isTrueFor(Argument::not(Argument::type(FileWasProcessed::class)))->willReturn(false);
     $payloadGenerator = $this->prophesize(PayloadGenerator::class);
     $payloadGenerator->__invoke(Argument::any(), Argument::any(), Argument::any())->will(function ($args) {
         list($previousMessage, $payload, $metadata) = $args;
         $payload['filename'] = $previousMessage->payload()['filename'];
     });
     $commandTemplate = new MessageTemplate(ProcessFile::class, new FQCNMessageFactory(), [], [], $payloadGenerator->reveal());
     $chapterTemplate = new ChapterTemplate(ChapterName::fromString('File Processor'), $commandTemplate, $startCondition->reveal(), $isDoneCondition->reveal());
     return [$chapterTemplate];
 }
开发者ID:bweston92,项目名称:done,代码行数:20,代码来源:StoryTest.php

示例11: let

 function let(PaymentPlanCalculatorInterface $delegatedFooCalculator)
 {
     $delegatedFooCalculator->supportsDefinition('Foo')->willReturn(true);
     $delegatedFooCalculator->supportsDefinition(Argument::not('Foo'))->willReturn(false);
     $this->registerCalculator($delegatedFooCalculator);
 }
开发者ID:cambridgeuniversity,项目名称:ice-paymentplan,代码行数:6,代码来源:CompositePlanCalculatorSpec.php

示例12:

 function it_does_not_support_other_normalizations(Family $family)
 {
     $this->supportsNormalization($family, 'csv')->shouldReturn(false);
     $this->supportsNormalization(Argument::not($family), 'xml')->shouldReturn(false);
     $this->supportsNormalization(Argument::not($family), 'json')->shouldReturn(false);
 }
开发者ID:Sylake,项目名称:Sylakim,代码行数:6,代码来源:FamilyNormalizerSpec.php

示例13:

 function its_query_when_the_specification_is_not_a_sql_user_specification()
 {
     $this->shouldThrow(new \InvalidArgumentException('This argument must be a SQLUserSpecification'))->during('query', [Argument::not('Infrastructure\\Persistence\\Sql\\Repository\\User\\SqlUserSpecification')]);
 }
开发者ID:benatespina,项目名称:ddd-symfony,代码行数:4,代码来源:SqlUserRepositorySpec.php


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