Money\MoneyTest::testPositivity PHP Метод

testPositivity() публичный Метод

public testPositivity ( )
    public function testPositivity()
    {
        $euro1 = Money::fromAmount('100', Currency::fromCode('EUR'));
        $euro2 = Money::fromAmount('0', Currency::fromCode('EUR'));
        $euro3 = Money::fromAmount('-100', Currency::fromCode('EUR'));
        $euro4 = Money::fromAmount('0.0001', Currency::fromCode('EUR'));
        $this->assertTrue($euro1->isPositive());
        $this->assertFalse($euro1->isNegative());
        $this->assertFalse($euro1->isZero());
        $this->assertTrue($euro2->isZero());
        $this->assertFalse($euro2->isNegative());
        $this->assertFalse($euro2->isPositive());
        $this->assertTrue($euro3->isNegative());
        $this->assertFalse($euro3->isPositive());
        $this->assertFalse($euro3->isZero());
        $this->assertFalse($euro4->isZero());
    }