eth_blockNumber.
This commit is contained in:
parent
d7276001f3
commit
f3833e45b6
@ -29,6 +29,7 @@ class Eth
|
||||
'eth_hashrate' => [],
|
||||
'eth_gasPrice' => [],
|
||||
'eth_accounts' => [],
|
||||
'eth_blockNumber' => [],
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -178,6 +178,27 @@ class EthTest extends TestCase
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* testBlockNumber
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testBlockNumber()
|
||||
{
|
||||
$eth = $this->web3->eth;
|
||||
|
||||
$eth->blockNumber(function ($err, $blockNumber) {
|
||||
if ($err !== null) {
|
||||
return $this->fail($err->getMessage());
|
||||
}
|
||||
if (isset($blockNumber->result)) {
|
||||
$this->assertTrue(is_string($blockNumber->result));
|
||||
} else {
|
||||
$this->fail($blockNumber->error->message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* testUnallowedMethod
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user