예제 #1
0
 /**
  * @param \Ingenerator\Pigeonhole\Pigeonhole $pigeonhole
  * @param Message $msg,...
  */
 protected function given_messages($pigeonhole, $msg)
 {
     $pigeonhole->has_messages()->willReturn(TRUE);
     $messages = func_get_args();
     array_shift($messages);
     $pigeonhole->clear()->willReturn($messages);
 }
예제 #2
0
 /**
  * @param \Ingenerator\Pigeonhole\Message $message
  */
 function it_persists_messages_in_the_session($message)
 {
     $other_instance = new Pigeonhole($this->mock_session);
     $other_instance->add($message->getWrappedObject());
     $this->has_messages()->shouldReturn(TRUE);
     $this->peek()->shouldReturn(array($message));
     $other_instance->clear();
     $this->has_messages()->shouldReturn(FALSE);
 }