web3.php/test/unit/NetTest.php
2017-12-19 11:10:24 +08:00

43 lines
710 B
PHP

<?php
namespace Test\Unit;
use RuntimeException;
use Test\TestCase;
use Web3\Providers\HttpProvider;
use Web3\RequestManagers\RequestManager;
class NetTest extends TestCase
{
/**
* net
*
* @var Web3\Net
*/
protected $net;
/**
* setUp
*
* @return void
*/
public function setUp()
{
parent::setUp();
$this->net = $this->web3->net;
}
/**
* testInstance
*
* @return void
*/
public function testInstance()
{
$net = $this->net;
$this->assertTrue($net->provider instanceof HttpProvider);
$this->assertTrue($net->provider->requestManager instanceof RequestManager);
}
}