use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;
final class SmsapiTransportTest extends TransportTestCase
{ public static function createTransport(HttpClientInterface
$client = null, string
$from = '', bool
$fast = false, bool
$test = false
): SmsapiTransport
{ return (new SmsapiTransport('testToken',
$from,
$client ??
new MockHttpClient()))->
setHost('test.host'
)->
setFast($fast)->
setTest($test);
} public static function toStringProvider(): iterable
{ yield ['smsapi://test.host', self::
createTransport()];
yield ['smsapi://test.host?fast=1', self::
createTransport(null, '', true
)];
yield ['smsapi://test.host?test=1', self::
createTransport(null, '', false, true
)];
yield ['smsapi://test.host?fast=1&test=1', self::
createTransport(null, '', true, true
)];
yield ['smsapi://test.host?from=testFrom', self::
createTransport(null, 'testFrom'
)];
yield ['smsapi://test.host?from=testFrom&fast=1', self::
createTransport(null, 'testFrom', true
)];
yield ['smsapi://test.host?from=testFrom&test=1', self::
createTransport(null, 'testFrom', false, true
)];