1. Go to this page and download the library: Download uru/testhub-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Sandbox;
use TestHub\Bundle\HttpClient\State\ContextProviderInterface;
final class CurrentAgentProvider implements ContextProviderInterface
{
public function __construct(private AgentRepository $agents) {}
public function get(): array
{
return [$this->agents->current()];
}
}
namespace App\Sandbox;
use TestHub\Bundle\Action\ActionInterface;
final class PayoutAction implements ActionInterface
{
public function getName(): string { return 'payout'; }
public function getLabel(): string { return 'Run payout'; }
public function getDescription(): string { return 'Processes approved withdrawals of a gateway.'; }
/** Form fields, as name => label. */
public function getParameters(): array
{
return ['provider' => 'Provider', 'gateway' => 'Gateway'];
}
public function run(array $parameters): string
{
// ...
return 'Payout finished.';
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.