Moontoast\Math\BigNumberTest::testFilterNumber PHP Method

testFilterNumber() public method

public testFilterNumber ( )
    public function testFilterNumber()
    {
        $filterNumber = new \ReflectionMethod('Moontoast\\Math\\BigNumber', 'filterNumber');
        $filterNumber->setAccessible(true);
        $bn1 = new BigNumber(0);
        $bn2 = new BigNumber(2147483647);
        $this->assertSame('1234', $filterNumber->invoke($bn1, 1234));
        $this->assertSame('1234567890.1234', $filterNumber->invoke($bn1, 1234567890.1234));
        $this->assertSame('9223372036854775808', $filterNumber->invoke($bn1, '9,223,372,036,854,775,808'));
        $this->assertSame('9223372036854775808.432', $filterNumber->invoke($bn1, '9,223,372,036,854,775,808.432'));
        $this->assertSame('2147483647', $filterNumber->invoke($bn1, $bn2));
    }