shh_newGroup
This commit is contained in:
parent
647da46e09
commit
f6a7ffebdb
58
src/Methods/Shh/NewGroup.php
Normal file
58
src/Methods/Shh/NewGroup.php
Normal file
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of web3.php package.
|
||||
*
|
||||
* (c) Kuan-Cheng,Lai <alk03073135@gmail.com>
|
||||
*
|
||||
* @author Peter Lai <alk03073135@gmail.com>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
namespace Web3\Methods\Shh;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Web3\Methods\EthMethod;
|
||||
|
||||
class NewGroup extends EthMethod
|
||||
{
|
||||
/**
|
||||
* validators
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $validators = [];
|
||||
|
||||
/**
|
||||
* inputFormatters
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $inputFormatters = [];
|
||||
|
||||
/**
|
||||
* outputFormatters
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $outputFormatters = [];
|
||||
|
||||
/**
|
||||
* defaultValues
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultValues = [];
|
||||
|
||||
/**
|
||||
* construct
|
||||
*
|
||||
* @param string $method
|
||||
* @param array $arguments
|
||||
* @return void
|
||||
*/
|
||||
// public function __construct($method='', $arguments=[])
|
||||
// {
|
||||
// parent::__construct($method, $arguments);
|
||||
// }
|
||||
}
|
@ -38,7 +38,8 @@ class Shh
|
||||
* @var array
|
||||
*/
|
||||
private $allowedMethods = [
|
||||
'shh_version', 'shh_newIdentity', 'shh_hasIdentity'
|
||||
'shh_version', 'shh_newIdentity', 'shh_hasIdentity',
|
||||
// doesn't exist: 'shh_newGroup'
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -94,6 +94,23 @@ class ShhApiTest extends TestCase
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* testNewGroup
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
// public function testNewGroup()
|
||||
// {
|
||||
// $shh = $this->shh;
|
||||
|
||||
// $shh->newGroup(function ($err, $group) {
|
||||
// if ($err !== null) {
|
||||
// return $this->fail($err->getMessage());
|
||||
// }
|
||||
// $this->assertEquals(mb_strlen($group), 132);
|
||||
// });
|
||||
// }
|
||||
|
||||
/**
|
||||
* testWrongParam
|
||||
* We transform data and throw invalid argument exception
|
||||
|
Loading…
Reference in New Issue
Block a user