/** * @depends testSerializationDeserialization * @param Block $obj */ public function testGetters($obj) { $txids = array("7f00b52d075b3596cbd37ba5418640ace14a22ed6c5d154c4db5dd80e049b800", "a90d9bc04a4e6be53e0ddc47b043625a0bdc849ef3bc05f551bc05336de3a87c", "5895df2891075646f6c191206149ba7d65ce5a31edb8d99eea307b254820ad52", "502afd1348ff1f3fad6bfb68eb2628856e32fcdd525136e1f5505ecd1aa63366", "c342960db1a8c26713953cef86689032f9f57912078101a1f26d0b0d4cb718ee", "d50ccb7cd632800cf3b1be83e40a937926574ff796e39eedbd8a1a486a8cc024", "efc1776a5b2158e29e59a0c264b82b2986d814beff4061bb7273ef1414bb34e5", "a7485748999fe6631b95409df88e74edd1407faefd17fa5ad9978281fa142eab", "a9a5acad7e9ae8365471f8176c4004fa69a8808c0e0ba466fa943b96af502229", "f55121a5b6f1f697e0d95e8eec7e5b8398ac8320e3d664a978b7030957872281", "a73464326b2f2bb600362ef53d92f4a261e36d966f9ecb97e618acc0a37fcd90", "d4034361031b08279d115fb303d7efa174b958d0816aac82d8b858546f716028", "9ec77781b6b3437ea94d54dfe0a42e9a1a32aa47f2096e6bc7e6fb551958bb47", "ee41b6903945d6cd852a2d13d5b7329d0293909993886de8714e7987bc141db8", "5848763ec4c71d4d464302910118cdb5594014ca491983c0e34501e13596b227", "7c75cebdb66bd7d39d75f01be5cd59dd098624f1efe4260057776659c43fe2b7", "e2d0bee4bc5b1c74c053ddaaaa476f7198658e5dd47526a1eee0a46f900ec635", "ee4ab06c9f28f044274c45644b6f09b37b3ff66152d4ee28e67c9f26e444d3f4", "77fba09a3e6cc6a78ce68f57b7eaf2202e8a3c732c67e4ccfa2bd5144f4f711d", "f854aebae95150b379cc1187d848d58225f3c4157fe992bcd166f58bd5063449"); $this->assertEquals($obj->getHash(), "0000000000000000c504bdea36e531d8089d324f2d936c86e3274f97f8a44328"); $this->assertEquals($obj->getHeight(), 293000); $this->assertEquals($obj->getChain(), "BTC.main"); $this->assertEquals($obj->getTotal(), 288801092067); $this->assertEquals($obj->getFees(), 6635337); $this->assertEquals($obj->getVer(), 2); $this->assertEquals($obj->getTime(), "2014-03-29T01:29:19Z"); $this->assertEquals($obj->getReceivedTime(), "2014-12-04T02:52:15.827Z"); $this->assertEquals($obj->getBits(), 419486617); $this->assertEquals($obj->getNonce(), 704197304); $this->assertEquals($obj->getNTx(), 373); $this->assertEquals($obj->getPrevBlock(), "0000000000000000b358b3b54788547080f49ed52392c2ed32a241951e2c9d5f"); $this->assertEquals($obj->getMrklRoot(), "5edf6a7e92e65d32843a79227042c215b875675fb92ff9613c90d6964fb069cd"); $this->assertEquals($obj->getTxids(), $txids); $this->assertEquals($obj->getDepth(), 59099); $this->assertEquals($obj->getPrevBlockUrl(), "https://api.blockcypher.com/v1/btc/main/blocks/0000000000000000b358b3b54788547080f49ed52392c2ed32a241951e2c9d5f"); $this->assertEquals($obj->getTxUrl(), "https://api.blockcypher.com/v1/btc/main/txs/"); // NOTICE: \u0026 in json is replaced by & in the object $this->assertEquals($obj->getNextTxids(), "https://api.blockcypher.com/v1/btc/main/blocks/0000000000000000c504bdea36e531d8089d324f2d936c86e3274f97f8a44328?txstart=20&limit=20"); $this->assertNotEquals($obj->getNextTxids(), "https://api.blockcypher.com/v1/btc/main/blocks/0000000000000000c504bdea36e531d8089d324f2d936c86e3274f97f8a44328?txstart=20\\u0026limit=20"); }