AllMySmsOptions example



namespace Symfony\Component\Notifier\Bridge\AllMySms\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsOptions;

class AllMySmsOptionsTest extends TestCase
{
    public function testAllMySmsOptions()
    {
        $allMySmsOptions = (new AllMySmsOptions())
            ->alerting(1)
            ->date('test_date')
            ->campaignName('test_campaign_name')
            ->cliMsgId('test_cli_msg_id')
            ->simulate(1)
            ->uniqueIdentifier('test_unique_identifier')
            ->verbose(1);

        self::assertSame([
            'alerting' => 1,
            'date' => 'test_date',
            


    public static function toStringProvider(): iterable
    {
        yield ['allmysms://api.allmysms.com', self::createTransport()];
        yield ['allmysms://api.allmysms.com?from=TEST', self::createTransport(null, 'TEST')];
    }

    public static function supportedMessagesProvider(): iterable
    {
        yield [new SmsMessage('0611223344', 'Hello!')];
        yield [new SmsMessage('0611223344', 'Hello!', 'from', new AllMySmsOptions(['from' => 'foo']))];
    }

    public static function unsupportedMessagesProvider(): iterable
    {
        yield [new ChatMessage('Hello!')];
        yield [new DummyMessage()];
    }
}
Home | Imprint | This part of the site doesn't use cookies.