Bitpay\PayoutTest::testUpdateInstruction PHP Method

testUpdateInstruction() public method

    public function testUpdateInstruction()
    {
        $address1 = '1NCNN8UKCZAjGkcgzA2RMZSHy9ao4YSWj7';
        $address2 = '1FXXRhvwtrGzBH65aK6kVwDeHq7hEXLuF9';
        $instruction = new PayoutInstruction();
        $instruction->setAddress($address1)->setAmount(10);
        $this->payout->addInstruction($instruction);
        $this->payout->updateInstruction(0, 'setAddress', $address2);
        $out = $this->payout->getInstructions();
        $this->assertNotSame($out[0]->getAddress(), $address1);
        $this->assertSame($out[0]->getAddress(), $address2);
    }