public function testFromTransaction() { $transaction = new Transaction(TransactionType::SEND); $transaction->setTo(new Email('*****@*****.**')); $transaction->setAmount(new Money(1, CurrencyCode::BTC)); $transaction->setDescription('test description'); $data = $this->mapper->fromTransaction($transaction); $this->assertEquals(['type' => 'send', 'amount' => '1', 'currency' => 'BTC', 'description' => 'test description', 'to' => '*****@*****.**'], $data); }