Esempio n. 1
0
 function it_should_agree_to_clean_clothes(IMessageSender $messageSender)
 {
     // "send me a message that says, 'Can you get my clothes laundred, please'"
     $messageSender->sendMessage()->shouldBeCalled();
     $messageSender->sendMessage()->willReturn("Can you get my clothes laundred, please?");
     $this->askForALaundryService($messageSender)->shouldReturn(true);
 }
Esempio n. 2
0
 public function askForALaundryService(IMessageSender $messageSender)
 {
     if ($this->worker->respondToMessage($messageSender->sendMessage())) {
         return true;
     } else {
         return false;
     }
 }