RequestManagerTest
This commit is contained in:
parent
f20839f8de
commit
cdce5becf6
@ -14,6 +14,13 @@ class TestCase extends BaseTestCase
|
|||||||
*/
|
*/
|
||||||
protected $web3;
|
protected $web3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* testRinkebyHost
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $testRinkebyHost = 'https://rinkeby.infura.io/vuethexplore';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setUp
|
* setUp
|
||||||
*
|
*
|
||||||
@ -21,7 +28,7 @@ class TestCase extends BaseTestCase
|
|||||||
*/
|
*/
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
$web3 = new Web3('https://rinkeby.infura.io/vuethexplore');
|
$web3 = new Web3($this->testRinkebyHost);
|
||||||
$this->web3 = $web3;
|
$this->web3 = $web3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
25
test/unit/RequestManagerTest.php
Normal file
25
test/unit/RequestManagerTest.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Test\Unit;
|
||||||
|
|
||||||
|
use Test\TestCase;
|
||||||
|
use Web3\RequestManagers\RequestManager;
|
||||||
|
|
||||||
|
class RequestManagerTest extends TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* testSetHost
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testSetHost()
|
||||||
|
{
|
||||||
|
$requestManager = new RequestManager('http://localhost:8545');
|
||||||
|
|
||||||
|
$this->assertEquals($requestManager->host, 'http://localhost:8545');
|
||||||
|
|
||||||
|
$requestManager->host = $this->testRinkebyHost;
|
||||||
|
|
||||||
|
$this->assertEquals($requestManager->host, 'http://localhost:8545');
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user