diff --git a/src/Eth.php b/src/Eth.php index cb1aa36..bf7084e 100644 --- a/src/Eth.php +++ b/src/Eth.php @@ -28,6 +28,7 @@ class Eth 'eth_mining' => [], 'eth_hashrate' => [], 'eth_gasPrice' => [], + 'eth_accounts' => [], ]; /** diff --git a/test/unit/EthTest.php b/test/unit/EthTest.php index b52c9d1..b4aab92 100644 --- a/test/unit/EthTest.php +++ b/test/unit/EthTest.php @@ -157,6 +157,27 @@ class EthTest extends TestCase }); } + /** + * testAccounts + * + * @return void + */ + public function testAccounts() + { + $eth = $this->web3->eth; + + $eth->accounts(function ($err, $accounts) { + if ($err !== null) { + return $this->fail($err->getMessage()); + } + if (isset($accounts->result)) { + $this->assertTrue(is_array($accounts->result)); + } else { + $this->fail($accounts->error->message); + } + }); + } + /** * testUnallowedMethod *