ProviderTest.php 709 B

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