socialbox-php/tests/Socialbox/SocialClientTest.php
netkas 71563e51ee
Some checks are pending
CI / release_executable (push) Waiting to run
CI / release (push) Waiting to run
CI / debug (push) Waiting to run
CI / debug_executable (push) Waiting to run
CI / check-phpunit (push) Waiting to run
CI / check-phpdoc (push) Waiting to run
CI / generate-phpdoc (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / release-documentation (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
Refactor Docker configuration and update encryption channels schema
2025-03-18 13:04:32 -04:00

37 lines
1.1 KiB
PHP

<?php
namespace Socialbox;
use Exception;
use Helper;
use PHPUnit\Framework\TestCase;
class SocialClientTest extends TestCase
{
public function testCoffeePing(): void
{
try
{
$rpcClient = new SocialClient(Helper::generateRandomPeer(COFFEE_DOMAIN, prefix: 'pingTest'));
$this->assertTrue($rpcClient->ping(), sprintf('Failed to ping %s', COFFEE_DOMAIN));
}
catch (Exception $e)
{
$this->fail('Failed to create RPC client: ' . $e->getMessage());
}
}
public function testTeapotPing(): void
{
try
{
$rpcClient = new SocialClient(Helper::generateRandomPeer(TEAPOT_DOMAIN, prefix: 'pingTest'));
$this->assertTrue($rpcClient->ping(), sprintf('Failed to ping %s', TEAPOT_DOMAIN));
}
catch (Exception $e)
{
$this->fail('Failed to create RPC client: ' . $e->getMessage());
}
}
}