We have implemented package which help use to communicate with surface interface through function.
git clone https://github.com/nitor-infotech-oss/parity-substrate-interface.git
You can install the package via composer:
composer require nitorInfoTechOss/substrate-interface-package
-
Create Test folder and one php file to test code
-
run command "touch composer.json"
-
try to run following code.
$testClass = new SubstrateInterface("http_url");
echo $testClass->rpc->system->name();
vendor/phpunit/phpunit/phpunit
I] Clone project git clone https://github.com/neha0921/substrate-interface-package.git
II] Update Composer composer Update
III] To check testcase run following command
vendor/bin/phpunit
e.g. ::
-
vendor/bin/phpunit --filter testSystemName
-
vendor/bin/phpunit --filter testRpcMethods
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.