Split eth tests
This commit is contained in:
parent
cd28ad0e7d
commit
d0835825d3
1129
test/unit/EthApiTest.php
Normal file
1129
test/unit/EthApiTest.php
Normal file
File diff suppressed because it is too large
Load Diff
50
test/unit/EthBatchTest.php
Normal file
50
test/unit/EthBatchTest.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Test\Unit;
|
||||
|
||||
use RuntimeException;
|
||||
use Test\TestCase;
|
||||
|
||||
class EthBatchTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* eth
|
||||
*
|
||||
* @var \Web3\Eth
|
||||
*/
|
||||
protected $eth;
|
||||
|
||||
/**
|
||||
* setUp
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->eth = $this->web3->eth;
|
||||
}
|
||||
|
||||
/**
|
||||
* testBatch
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testBatch()
|
||||
{
|
||||
$eth = $this->eth;
|
||||
|
||||
$eth->batch(true);
|
||||
$eth->protocolVersion();
|
||||
$eth->syncing();
|
||||
|
||||
$eth->provider->execute(function ($err, $data) {
|
||||
if ($err !== null) {
|
||||
return $this->fail($err->getMessage());
|
||||
}
|
||||
$this->assertTrue(is_string($data[0]->result));
|
||||
$this->assertTrue($data[1]->result !== null);
|
||||
});
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user