Money\MoneyTest::testRoundWithoutRounding PHP Method

testRoundWithoutRounding() public method

    public function testRoundWithoutRounding()
    {
        $money = Money::fromAmount('3.33333333333', Currency::fromCode('EUR'));
        $expected1 = Money::fromAmount('3', Currency::fromCode('EUR'));
        $expected2 = Money::fromAmount('3.33', Currency::fromCode('EUR'));
        $this->assertTrue($money->round()->equals($expected1));
        $this->assertTrue($money->round(2)->equals($expected2));
        $this->assertNotSame($money, $money->round());
    }