1 | <?php |
||
10 | abstract class AbstractTestCase extends \PHPUnit_Framework_TestCase |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $rpcHost; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $rpcPort; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $rpcUser; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $rpcPass; |
||
31 | |||
32 | /** |
||
33 | * @var \Nbobtc\Http\Client |
||
34 | */ |
||
35 | protected $client; |
||
36 | |||
37 | /** |
||
38 | * @var array |
||
39 | */ |
||
40 | private $scriptFlagNames; |
||
41 | |||
42 | /** |
||
43 | * @var NetworkInterface |
||
44 | */ |
||
45 | protected $network; |
||
46 | |||
47 | /** |
||
48 | * AbstractTestCase constructor. |
||
49 | * @param null $name |
||
50 | * @param array $data |
||
51 | * @param string $dataName |
||
52 | */ |
||
53 | public function __construct($name = null, array $data = [], $dataName = '') |
||
58 | |||
59 | protected function initRpcConfig() |
||
90 | |||
91 | /** |
||
92 | * @return string |
||
93 | */ |
||
94 | protected function getRpcDsn() |
||
98 | |||
99 | /** |
||
100 | * @return \Nbobtc\Http\Client |
||
101 | */ |
||
102 | protected function getRpcClient() |
||
110 | |||
111 | /** |
||
112 | * @param string $command |
||
113 | * @param array $params |
||
114 | * @return mixed |
||
115 | */ |
||
116 | protected function makeRpcRequest($command, array $params = []) |
||
126 | |||
127 | |||
128 | /** |
||
129 | * @param string $name |
||
130 | * @return array |
||
131 | */ |
||
132 | public function jsonDataFile($name) |
||
142 | |||
143 | /** |
||
144 | * @param string $filename |
||
145 | * @return string |
||
146 | */ |
||
147 | public function dataFile($filename) |
||
155 | |||
156 | /** |
||
157 | * @param string $file |
||
158 | * @return string |
||
159 | */ |
||
160 | public function dataPath($file) |
||
164 | |||
165 | |||
166 | /** |
||
167 | * @return array |
||
168 | */ |
||
169 | public function calcMapScriptFlags() |
||
194 | |||
195 | /** |
||
196 | * @param string $string |
||
197 | * @return int |
||
198 | */ |
||
199 | public function getScriptFlagsFromString($string) |
||
218 | |||
219 | } |
||
220 |