Bitpay\Client\ClientTest::testCreateInvoiceWithTooMuchPrecisionEvenForBitcoin PHP Метод

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

    public function testCreateInvoiceWithTooMuchPrecisionEvenForBitcoin()
    {
        $item = $this->getMockItem();
        $currency = $this->getMockCurrency();
        $currency->method('getCode')->will($this->returnValue("BTC"));
        $item->method('getPrice')->will($this->returnValue(0.9999999000000001));
        $buyer = $this->getMockBuyer();
        $buyer->method('getAddress')->will($this->returnValue(array()));
        $invoice = $this->getMockInvoice();
        $invoice->method('getItem')->willReturn($item);
        $invoice->method('getBuyer')->willReturn($buyer);
        $invoice->method('setId')->will($this->returnSelf());
        $invoice->method('setUrl')->will($this->returnSelf());
        $invoice->method('setStatus')->will($this->returnSelf());
        $invoice->method('setBtcPrice')->will($this->returnSelf());
        $invoice->method('setPrice')->will($this->returnSelf());
        $invoice->method('setInvoiceTime')->will($this->returnSelf());
        $invoice->method('setExpirationTime')->will($this->returnSelf());
        $invoice->method('setCurrentTime')->will($this->returnSelf());
        $invoice->method('setBtcPaid')->will($this->returnSelf());
        $invoice->method('setRate')->will($this->returnSelf());
        $invoice->method('setExceptionStatus')->will($this->returnSelf());
        $invoice->method('getCurrency')->willReturn($currency);
        $this->client->createInvoice($invoice);
    }