/** * @param array $messages * @param array $values * @param string $fromMemberId * @return \Psr\Http\Message\ResponseInterface */ public function respondInvalidTransferInput(array $messages, array $values, $fromMemberId) { $this->form->submit($values); $this->form->setErrorMessages($messages); $this->respondEnterTransferInformation(Identifier::fromString($fromMemberId)); }
/** @test */ function it_should_populate_the_form_with_the_transfer_values() { $form = new TransferFundsForm(); $form->submit(['fromMemberId' => 'abc', 'toMemberId' => 'xyz', 'amount' => 100]); $this->assertEquals(['fromMemberId' => 'abc', 'toMemberId' => 'xyz', 'amount' => ['amount' => 100, 'currency' => 'MXN']], $form->values()); }