assertTrue($web3->provider instanceof HttpProvider); $this->assertTrue($web3->eth instanceof Eth); $this->assertTrue($web3->net instanceof Net); $this->assertTrue($web3->personal instanceof Personal); $this->assertTrue($web3->shh instanceof Shh); $this->assertTrue($web3->utils instanceof Utils); } /** * testSetProvider * * @return void */ public function testSetProvider() { $web3 = $this->web3; $web3->provider = new HttpProvider('http://localhost:8545'); $this->assertEquals($web3->provider->host, 'http://localhost:8545'); $web3->provider = null; $this->assertEquals($web3->provider->host, 'http://localhost:8545'); } /** * testCallThrowRuntimeException * * @return void */ public function testCallThrowRuntimeException() { $this->expectException(RuntimeException::class); $web3 = new Web3(null); $web3->sha3('hello world'); } }