/** * @covers ::evaluate */ public function testStringAmount() { $money = new Money(); $money->setValue(['amount' => '50', 'currency' => 'XTS']); $this->assertTrue($money->isValid()); $obj = $money->evaluate(); $this->assertInstanceOf('SebastianBergmann\\Money\\Money', $obj); $this->assertSame(50, $obj->getAmount()); $this->assertEquals(new \SebastianBergmann\Money\Currency('XTS'), $obj->getCurrency()); }