RequestManagerTest.php 689 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Test\Unit;
  3. use Test\TestCase;
  4. use Web3\RequestManagers\RequestManager;
  5. class RequestManagerTest extends TestCase
  6. {
  7. /**
  8. * testSetHost
  9. *
  10. * @return void
  11. */
  12. public function testSetHost()
  13. {
  14. $requestManager = new RequestManager('http://localhost:8545', 0.1);
  15. $this->assertEquals($requestManager->host, 'http://localhost:8545');
  16. $this->assertEquals($requestManager->timeout, 0.1);
  17. $requestManager->host = $this->testRinkebyHost;
  18. $requestManager->timeout = 1;
  19. $this->assertEquals($requestManager->host, 'http://localhost:8545');
  20. $this->assertEquals($requestManager->timeout, 0.1);
  21. }
  22. }