/** * @param MemberInformation $forMember */ private function printStatement(MemberInformation $forMember) { $this->output->writeln("{$this->formatter->formatMember($forMember)}"); }
/** @test */ function it_should_format_a_member_information() { $aMember = A::member()->withName('Mario Montealegre')->withBalance(1500025)->build(); $this->assertEquals('Mario Montealegre $15,000.25 MXN', $this->formatter->formatMember($aMember->information())); }
/** * @param Event $event * @return boolean */ public function handle(Event $event) { $this->logger->info(sprintf('Member with ID "%s" transferred %s to member with ID "%s" on %s', $event->fromMemberId(), $this->formatter->formatMoney($event->amount()), $event->toMemberId(), $event->occurredOn()->format('Y-m-d H:i:s'))); }
/** * @param integer $amount * @return string */ public function formatMoneyAmount($amount) { return $this->formatter->formatMoneyAmount($amount); }
function it_should_delegate_formatting_a_member() { $member = A::member()->build()->information(); $this->extension->formatMember($member); $this->formatter->shouldHaveReceived('formatMember')->once()->with($member); }