コード例 #1
0
ファイル: MoneyTest.php プロジェクト: cknow/laravel-money
 public function testGetters()
 {
     $m = new Money(100, new Currency('BRL'));
     $this->assertEquals(100, $m->getAmount());
     $this->assertEquals(1, $m->getValue());
     $this->assertEquals(new Currency('BRL'), $m->getCurrency());
     $this->assertNotEmpty($m->toArray());
     $this->assertJson($m->toJson());
     $this->assertNotEmpty($m->jsonSerialize());
 }