Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
EthDataTypeTest.php
Go to the documentation of this file.
1 <?php
2 namespace Ethereum;
5 
12 {
13 
14  private $allTypes;
15 
16  public function __construct($name = null, array $data = [], $dataName = '')
17  {
18  parent::__construct($name, $data, $dataName);
19  $this->allTypes = EthDataType::getAllTypeClasses();
20  }
21 
22 
26  public function testGetTypeClass() {
27  foreach ($this->allTypes as $type) {
28 
29  // @depreciated Changed to allow only String
30  // $this->assertEquals(EthDataType::getTypeClass(array($type), true), 'array');
31  // $this->assertEquals(EthDataType::getTypeClass(array($type), false), $type);
32 
33  $this->assertEquals(EthDataType::getTypeClass($type, true), $type);
34  $this->assertEquals(EthDataType::getTypeClass($type, false), $type);
35  }
36  }
37 
38 
39 }
__construct($name=null, array $data=[], $dataName='')
Definition: Abi.php:3