Split eth tests

This commit is contained in:
sc0Vu 2017-12-19 11:20:16 +08:00
parent cd28ad0e7d
commit d0835825d3
3 changed files with 1183 additions and 1116 deletions

1129
test/unit/EthApiTest.php Normal file

File diff suppressed because it is too large Load Diff

View 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