本文整理汇总了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);
}
示例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');
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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');
}
示例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];
}
示例11: let
function let(PaymentPlanCalculatorInterface $delegatedFooCalculator)
{
$delegatedFooCalculator->supportsDefinition('Foo')->willReturn(true);
$delegatedFooCalculator->supportsDefinition(Argument::not('Foo'))->willReturn(false);
$this->registerCalculator($delegatedFooCalculator);
}
示例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);
}
示例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')]);
}