function it_handle_handlers(HandlerInterface $handler, RuleInterface $rule)
 {
     $configuration = array();
     $this->addHandler($handler);
     $handler->handle(Argument::exact($configuration), Argument::exact($rule->getWrappedObject()))->shouldBeCalled();
     $this->handle($configuration, $rule);
 }
 function it_visit_token(MatcherInterface $matcher, TokenInterface $token, CollatorInterface $collator, MatcherInterface $matcher, MergingStrategyInterface $mergingStrategy, RuleInterface $rule)
 {
     $this->beConstructedWith($matcher, $mergingStrategy);
     $rules = new \ArrayIterator(array($rule->getWrappedObject()));
     $matcher->match(Argument::exact($token->getWrappedObject()))->shouldBeCalledTimes(1)->willReturn($rules);
     $mergingStrategy->merge(Argument::exact($rules), Argument::exact($collator->getWrappedObject()))->shouldBeCalledTimes(1);
     $this->visit($token, $collator)->shouldReturn(VisitorInterface::STATE_SEEKING);
 }