Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
TestEthClient.php
Go to the documentation of this file.
1 <?php
9 namespace Ethereum;
10 
12 use Exception;
64 abstract class TestEthClient extends TestStatic {
65 
72  public static function setUpBeforeClass() {
73 
74  $networkId = getenv("NETWORK_ID");
75  $serverUrl = getenv("SERVER_URL");
76 
77  if ($networkId && $serverUrl) {
78  if (!defined('SERVER_URL')) {
79  define('SERVER_URL', $serverUrl);
80  }
81  if (!defined('NETWORK_ID')) {
82  define('NETWORK_ID', $networkId);
83  }
84  }
85  else
86  {
87  throw new \Exception(
88  'NETWORK_ID and SERVER_URL should env vars be defined phpunit.xml to provide defaults.'
89  );
90  }
91  }
92 }
Definition: Abi.php:3