eth_uninstallFilter
This commit is contained in:
parent
851febf048
commit
2cb693fffa
@ -275,7 +275,14 @@ class Eth
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'eth_newPendingTransactionFilter' => []
|
'eth_newPendingTransactionFilter' => [],
|
||||||
|
'eth_uninstallFilter' => [
|
||||||
|
'params' => [
|
||||||
|
[
|
||||||
|
'validators' => QuantityValidator::class
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -917,6 +917,32 @@ class EthTest extends TestCase
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* testUninstallFilter
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testUninstallFilter()
|
||||||
|
{
|
||||||
|
$eth = $this->eth;
|
||||||
|
|
||||||
|
$eth->uninstallFilter('0x01', function ($err, $filter) {
|
||||||
|
if ($err !== null) {
|
||||||
|
// infura banned us to uninstall filter
|
||||||
|
return $this->assertTrue($err->getCode() === 405);
|
||||||
|
}
|
||||||
|
if (isset($filter->result)) {
|
||||||
|
$this->assertTrue(is_string($filter->result));
|
||||||
|
} else {
|
||||||
|
if (isset($filter->error)) {
|
||||||
|
$this->assertTrue(is_string($filter->error->message));
|
||||||
|
} else {
|
||||||
|
$this->assertTrue(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testUnallowedMethod
|
* testUnallowedMethod
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user