Example #1
0
 /**
  * @depends testSerializationDeserialization
  * @param MicroTX $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getFromPubkey(), "02d4e3404e175923adf89c932fab96758716f6a0a896890f2494c5d9141eb3f543");
     $this->assertEquals($obj->getFromPrivate(), "2c2cc015519b79782bd9c5af66f442e808f573714e3c4dc6df7d79c183963cff");
     /** @noinspection SpellCheckingInspection */
     $this->assertEquals($obj->getFromWif(), "BpouCdZ5dXbjcUDQBj8ZVYBbSPtWYDQHxuDcP48VA6Q7dZuqW4UJ");
     $this->assertEquals($obj->getToAddress(), "C4MYFr4EAdqEeUKxTnPUF3d3whWcPMz1Fi");
     $this->assertEquals($obj->getValueSatoshis(), 10000);
     /** @noinspection SpellCheckingInspection */
     $this->assertEquals($obj->getToken(), "c0afcccdde5081d6429de37d16166ead");
     $this->assertEquals($obj->getChangeAddress(), "C4MYFr4EAdqEeUKxTnPUF3d3whWcPMz1Fi");
     $this->assertEquals($obj->getWaitGuarantee(), true);
     /** @noinspection SpellCheckingInspection */
     $this->assertEquals($obj->getTosign(), array("488e6defc3f3d26a20505730a1c64b8a3499e225f1bbd8a0e1b51b38251eed0a"));
     /** @noinspection SpellCheckingInspection */
     $this->assertEquals($obj->getSignatures(), array("3045022100f99bef2add7d1fd9c771a530b8baf50fc080a95dc3c5abc4a9e520932ecaf2ca02204ab0ac7a9abf62470172eac9a9a285d711bb450026a15d6d64d8ae19ec090373"));
     $this->assertEquals($obj->getInputs(), array(TXInputTest::getObject()));
     $this->assertEquals($obj->getOutputs(), array(TXOutputTest::getObject()));
     $this->assertEquals($obj->getFees(), 735);
     $this->assertEquals($obj->getHash(), "7fc9e41e6ef29486bc4478ff063934ea9a1ecd08bbfb0a207b39ad92fe55bebf");
 }