 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\KazInfoTeh;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\No

*
 * @author Egor Taranov <dev@taranovegor.com>
 */
class KazInfoTehTransport extends AbstractTransport
{
    protected const HOST = 'kazinfoteh.org';

    public function __construct(
        private string $username,
        #[\SensitiveParameter] privat

tifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/*


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\KazInfoTeh;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;
use Symfony\Component\Notifier\Transport\Transp

>getScheme();

        if ('kaz-info-teh' !== $scheme) {
            throw new UnsupportedSchemeException($dsn, 'kaz-info-teh', $this->getSupportedSchemes());
        }

        $username = $this->getUser($dsn);
        $password = $this->getPassword($dsn)

ortInterface;

/**
 * @author Egor Taranov <dev@taranovegor.com>
 */
final class KazInfoTehTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): TransportInterface
    {
        $scheme = $dsn-


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\KazInfoTeh\KazInfoTehTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\MissingRequiredOpti

  public function createFactory(): KazInfoTehTransportFactory
    {
        return new KazInfoTehTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield [
            'kaz-info-teh://kazinfoteh.org:9507?sender=s

onTestTrait;

/**
 * @author Egor Taranov <dev@taranovegor.com>
 */
final class KazInfoTehTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use PHPUnit\Framework\Attributes\DataProvider;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\KazInfoTeh\KazInfoTehTransport;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier

t\HttpClientInterface;

/**
 * @author Egor Taranov <dev@taranovegor.com>
 */
final class KazInfoTehTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): TransportInterface
    {

\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Component\Notifier\Transport\TransportInterface;
use Symfony\Contracts\HttpClien


<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Mattermost;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author Nathanaël Martel <nat@nathanaelmartel.net>
 */
final class MattermostOptions implements MessageOptionsInterface
{
    public function __c

    public function toArray(): array
    {
        $options = $this->options;
        unset($options['recipient_id']);

        return $options;
    }

    public function getRecipientId(): ?string
    {
        return $this->options['recipient_id'] ?? n

onstruct(
        private array $options = [],
    ) {
    }

    /**
     * @return $this
     */
    public function recipient(string $id): static
    {
        $this->options['recipient_id'] = $id;

        return $this;
    }


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Mattermost;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\N

**
 * @author Emanuele Panzeri <thepanz@gmail.com>
 */
final class MattermostTransport extends AbstractTransport
{
    public function __construct(
        #[\SensitiveParameter] private string $token,
        private string $channel,
        private ?stri

otifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Mattermost;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Emanuele Panzeri <thepanz@gmail

         throw new UnsupportedSchemeException($dsn, 'mattermost', $this->getSupportedSchemes());
        }

        $path = $dsn->getPath();
        $token = $this->getUser($dsn);
        $channel = $dsn->getRequiredOption('channel');
        $host = $dsn-

.com>
 */
final class MattermostTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): MattermostTransport
    {
        $scheme = $dsn->getScheme();

        if ('mattermost' !== $scheme) {


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\Mattermost\MattermostTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\MissingRequiredOpti

;

    public function createFactory(): MattermostTransportFactory
    {
        return new MattermostTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield [
            'mattermost://host.test?channel=testCha

onTestTrait;

/**
 * @author Oskar Stark <oskarstark@googlemail.com>
 */
final class MattermostTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Notifier\Bridge\Mattermost\MattermostTransport;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Co

attermostTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): MattermostTransport
    {
        return (new MattermostTransport('testAccessToken', 'testChannel', null, $client ?? new Moc

mponent\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Oskar Stark <oskarstark@googlemail.com>
 */
final class M


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Isendpro;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Noti

nInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

final class IsendproTransport extends AbstractTransport
{
    protected const HOST = 'apirest.isendpro.com';

    public function __construct(
        #[\SensitiveParameter] private string

fier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptio


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Isendpro;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

final class IsendproTransportFactory extends Abs

);
        }

        $keyid = $this->getUser($dsn);
        $from = $dsn->getOption('from', null);
        $noStop = $dsn->getBooleanOption('no_stop');
        $sandbox = $dsn->getBooleanOption('sandbox');
        $host = 'default' === $dsn->getHost() ? n

tractTransportFactory
{
    public function create(Dsn $dsn): IsendproTransport
    {
        if ('isendpro' !== $dsn->getScheme()) {
            throw new UnsupportedSchemeException($dsn, 'isendpro', $this->getSupportedSchemes()


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\Isendpro\IsendproTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

final class IsendproTransportFactoryTest extends AbstractTra

ble
    {
        yield [
            'isendpro://host.test?no_stop=0&sandbox=0',
            'isendpro://account_key_id@host.test',
        ];

        yield [
            'isendpro://host.test?from=FROM&no_stop=0&sandbox=0',
            'isendpro://accou

nsportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): IsendproTransportFactory
    {
        return new IsendproTransportFactory();
    }

    public static function createProvider(): itera


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\Isendpro\IsendproTransport;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\M

tInterface;

final class IsendproTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): IsendproTransport
    {
        return (new IsendproTransport('accound_key_id', null, false, false,

essage\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClien


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\AmazonSns;

use AsyncAws\Sns\Input\PublishInput;
use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author Adrien Chinour <github@chinour.fr>
 */
final class AmazonSnsOptions implements MessageOptionsInterface
{
    public function _

 {
        return $this->recipient;
    }

    /**
     * @param string $topic The Topic ARN for SNS message
     *
     * @return $this
     */
    public function recipient(string $topic): static
    {
        $this->recipient = $topic;

        return $

_construct(
        private string $recipient,
        private array $options = [],
    ) {
    }

    public function toArray(): array
    {
        return $this->options;
    }

    public function getRecipientId(): ?string


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\AmazonSns;

use AsyncAws\Sns\SnsClient;
use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message

atcherInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Adrien Chinour <github@chinour.fr>
 */
final class AmazonSnsTransport extends AbstractTransport
{
    public function __construct(
        private SnsClient $snsClient,

\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDisp


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\AmazonSns;

use AsyncAws\Sns\SnsClient;
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Adrien Chinour <g

            throw new UnsupportedSchemeException($dsn, 'sns', $this->getSupportedSchemes());
        }

        $host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
        $port = $dsn->getPort();
        $protocol = 'disable' === $dsn->getOpti

ithub@chinour.fr>
 */
final class AmazonSnsTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): AmazonSnsTransport
    {
        $scheme = $dsn->getScheme();

        if ('sns' !== $scheme) {


p

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsOptions;

class AmazonSnsOptionsTest extends TestCase
{
    public function testGetRecipientId()
    {
        $options = new A

me('my-topic', $options->getRecipientId());
    }

    public function testToArray()
    {
        $options = new AmazonSnsOptions('my-topic');
        $options->subject('value');
        $this->assertSame(['Subject' => 'value'], $options->toArray());

mazonSnsOptions('my-topic');
        $this->assertSa


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;

class AmazonSnsTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    public f

n names will bypass default options retrieved by \AsyncAws\Core::get
        $_ENV['AWS_PROFILE'] = 'not-existing';
        $_ENV['AWS_REGION'] = 'us-east-1';

        return new AmazonSnsTransportFactory();
    }

    public static function createProvider

unction createFactory(): AmazonSnsTransportFactory
    {
        // Tests will fail if a ~/.aws/config file exists with a default.region value,
        // or if AWS_REGION env variable is set.
        // Setting a profile & regio


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use AsyncAws\Sns\Result\PublishResponse;
use AsyncAws\Sns\SnsClient;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsOptions;
use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransport;
use Symfony\Component\Notifier\Exception\InvalidArgumentExcept

fony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

class AmazonSnsTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): AmazonSns

ion;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Fixtures\TestOptions;
use Sym


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Chatwork;

/**
 * @author Ippei Sumida <ippey.s@gmail.com>
 */
class ChatworkMessageBodyBuilder
{
    private array $to = [];
    private string $body = '';
    private bool $selfUnread = false;

    public function to(array|string $userIds):

    $this->body = $body;

        return $this;
    }

    public function selfUnread(bool $selfUnread): self
    {
        $this->selfUnread = $selfUnread;

        return $this;
    }

    public function getMessageBody(): array
    {
        $content =

 self
    {
        if (\is_array($userIds)) {
            $this->to = $userIds;
        } else {
            $this->to = [$userIds];
        }

        return $this;
    }

    public function body(string $body): self
    {


hp

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Chatwork;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author Ippei Sumida <ippey.s@gmail.com>
 */
class ChatworkOptions implements MessageOptionsInterface
{
    public function __construct(
        priva

     */
    public function to(array|string $userIds): static
    {
        $this->options['to'] = $userIds;

        return $this;
    }

    /**
     * @return $this
     */
    public function selfUnread(bool $selfUnread): static
    {
        $this->op

te array $options = [],
    ) {
    }

    public function toArray(): array
    {
        return $this->options;
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * @return $this


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Chatwork;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\TransportExceptionInterface;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\MessageInterface;
use Sym

* @author Ippei Sumida <ippey.s@gmail.com>
 */
class ChatworkTransport extends AbstractTransport
{
    protected const HOST = 'api.chatwork.com';

    public function __construct(
        #[\SensitiveParameter] private string $apiToken,
        private str

fony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**


buted with this source code.
 */

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

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackDividerBlock;
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackSectionBlock;
use Symfony\Component\Notifier\Bridge\Slack\SlackOptions;
use Symfony\Component\Notifier\Exception\LogicException;
use Symfony\Component\Notifier\Notification\Notification;

/**
 * @author Oskar Stark <o

cted = null)
    {
        $this->assertSame($expected ?? $options, (new SlackOptions($options))->toArray());
    }

    public static function toArrayProvider(): iterable
    {
        yield 'empty is allowed' => [
            [],
            [],

skarstark@googlemail.com>
 */
final class SlackOptionsTest extends TestCase
{
    #[DataProvider('toArrayProvider')]
    #[DataProvider('toArraySimpleOptionsProvider')]
    public function testToArray(array $options, ?array $expe


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\Slack\SlackTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

final class SlackTransportFactoryTest exten

): iterable
    {
        yield [
            'slack://host.test',
            'slack://xoxb-TestToken@host.test',
        ];

        yield 'with path' => [
            'slack://host.test?channel=testChannel',
            'slack://xoxb-TestToken@host.test

ds AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): SlackTransportFactory
    {
        return new SlackTransportFactory();
    }

    public static function createProvider(


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Slack\Tests\Block;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackActionsBlock;

final class SlackActionsBlockTest extends TestCase
{
    public function testCanBeInstantiated()
    {
        $actions = new SlackActionsBlock();
        $actions->button('first button text', 'https://example.

n text',
                null,
                null,
                'test-value-4',
                [
                    'title' => [
                        'type' => 'plain_text',
                        'text' => 'test-confirm-title-4',

org', null, 'test-value')
            ->button('second button text', 'https://example.org/slack', 'danger')
            ->button('third button text', null, null, 'test-value-3')
            ->button(
                'fourth butto


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Slack\Tests\Block;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackHeaderBlock;
use Symfony\Component\Notifier\Exception\LengthException;

final class SlackHeaderBlockTest extends TestCase
{
    public

'type' => 'plain_text',
                'text' => 'header text',
            ],
            'block_id' => 'header_id',
        ], $header->toArray());
    }

    public function testThrowsWhenTextExceedsCharacterLimit()
    {
        $this->expectException

function testCanBeInstantiated()
    {
        $header = new SlackHeaderBlock('header text');
        $header->id('header_id');

        $this->assertSame([
            'type' => 'header',
            'text' => [


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Slack\Tests\Block;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackImageBlockElement;
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackSectionBlock;

final class SlackSectionBlockTest extends TestCase
{
    public function testCanBeIns

ection->field('section field in plain text with verbatim', false, true, true);
        $section->accessory(new SlackImageBlockElement('https://example.com/image.jpg', 'an image'));

        $this->assertSame([
            'type' => 'section',
            '

tantiated()
    {
        $section = new SlackSectionBlock();
        $section->text('section text');
        $section->field('section field');
        $section->field('section field with verbatim', true, true, false);
        $s


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Twilio;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Fabien Potencier <fabien@symfony.co

new UnsupportedSchemeException($dsn, 'twilio', $this->getSupportedSchemes());
        }

        $accountSid = $this->getUser($dsn);
        $authToken = $this->getPassword($dsn);
        $from = $dsn->getRequiredOption('from');
        $host = 'default' =

m>
 */
final class TwilioTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): TwilioTransport
    {
        $scheme = $dsn->getScheme();

        if ('twilio' !== $scheme) {
            throw


buted with this source code.
 */

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

use PHPUnit\Framework\Attributes\DataProvider;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\Twilio\TwilioTransport;
use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test

ransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null, string $from = 'from'): TwilioTransport
    {
        return new TwilioTransport('accountSid', 'authToken', $from, $client ?? new MockHttpClient());
    }

\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;

final class TwilioTransportTest extends T


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\SmsFactor;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Thibault Buathier <thibault.buathier@gmail.co

    throw new UnsupportedSchemeException($dsn, 'sms-factor', $this->getSupportedSchemes());
        }

        $tokenApi = $this->getUser($dsn);
        $sender = $dsn->getOption('sender');
        $pushType = $this->getPushType($dsn);

        $host = 'de

m>
 */
final class SmsFactorTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): SmsFactorTransport
    {
        $scheme = $dsn->getScheme();

        if ('sms-factor' !== $scheme) {


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\SmsFactor\SmsFactorTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

final class SmsFactorTransportF

function createProvider(): iterable
    {
        yield [
            'sms-factor://api.smsfactor.com?sender=MyCompany&push_type=alert',
            'sms-factor://TOKEN@default?push_type=alert&sender=MyCompany',
        ];
        yield [
            'sms-

actoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): SmsFactorTransportFactory
    {
        return new SmsFactorTransportFactory();
    }

    public static


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Notifier\Bridge\SmsFactor\SmsFactorPushType;
use Symfony\Component\Notifier\Bridge\SmsFactor\SmsFactorTransport;
use Symfony\Component\Notifier\Message\ChatMessage;
u

ass SmsFactorTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): SmsFactorTransport
    {
        return (new SmsFactorTransport('TOKEN', 'MY_COMPANY', SmsFactorPushType::Alert, $client

se Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

final cl


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\RocketChat;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Jeroen Spee <https://github.com

            throw new UnsupportedSchemeException($dsn, 'rocketchat', $this->getSupportedSchemes());
        }

        $accessToken = $this->getUser($dsn);
        $channel = $dsn->getOption('channel');
        $host = 'default' === $dsn->getHost() ? null

/Jeroeny>
 */
final class RocketChatTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): RocketChatTransport
    {
        $scheme = $dsn->getScheme();

        if ('rocketchat' !== $scheme) {


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\RocketChat\RocketChatTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

/**
 * @author Oskar Stark <

eturn new RocketChatTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield [
            'rocketchat://host.test?channel=testChannel',
            'rocketchat://accessToken@host.test?channel=testChannel',

oskarstark@googlemail.com>
 */
final class RocketChatTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): RocketChatTransportFactory
    {
        r


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Notifier\Bridge\RocketChat\RocketChatTransport;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Co

ocketChatTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null, ?string $channel = null): RocketChatTransport
    {
        return new RocketChatTransport('testAccessToken', $channel, $clie

mponent\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Oskar Stark <oskarstark@googlemail.com>
 */
final class R


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Slack;

use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\C

erface;

/**
 * @author Fabien Potencier <fabien@symfony.com>
 */
final class SlackTransport extends AbstractTransport
{
    protected const HOST = 'slack.com';

    public function __construct(
        #[\SensitiveParameter] private string $accessToken,

omponent\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInt


/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Slack\Block;

/**
 * @author Fabien Potencier <fabien@symfony.com>
 */
final class SlackActionsBlock extends AbstractSlackBlock
{
    public function __construct()
    {
        $this->options['type'] = 'actions';
    }

    /**
     *

{
            throw new \LogicException('Maximum number of buttons should not exceed 25.');
        }

        $element = new SlackButtonBlockElement($text, $url, $style, $value, $confirm);

        $this->options['elements'][] = $element->toArray();

@return $this
     */
    public function button(string $text, ?string $url = null, ?string $style = null, ?string $value = null, ?array $confirm = null): static
    {
        if (25 === \count($this->options['elements'] ?? []))


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Slack\Block;

/**
 * @author Fabien Potencier <fabien@symfony.com>
 */
final class SlackSectionBlock extends AbstractSlackBlock
{
    public function __construct()
    {
        $this->options['type'] = 'section';
    }

    /**
     * @return $this

'text' => $text,
        ];

        // verbatim is only available for markdown
        if ($markdown) {
            $this->options['text']['verbatim'] = $verbatim;
        } else {
            $this->options['text']['emoji'] = $emoji;
        }

        r

*/
    public function text(string $text, bool $markdown = true, bool $emoji = true, bool $verbatim = false): static
    {
        $this->options['text'] = [
            'type' => $markdown ? 'mrkdwn' : 'plain_text',


\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\Slack\SlackOptions;
use Symfony\Component\Notifier\Bridge\Slack\SlackSentMessage;
use Symfony\Component\Notifier\Bridge\Slack\SlackTransport;
use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Notification\Notification;
use Symf

ackTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null, ?string $channel = null): SlackTransport
    {
        return new SlackTransport('xoxb-TestToken', $channel, $client ?? new MockHtt

ony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;

final class Sl


*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Twilio;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

final class TwilioOptions implements MessageOptionsInterface
{
    public function __construct(
        private array $options = [],
    ) {
    }

    public funct

ions;
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * @return $this
     */
    public function webhookUrl(string $url): static
    {
        $this->options['webhook_url'] = $url;

        return $this;

ion toArray(): array
    {
        return $this->opt


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Twilio;

use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\

face;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Fabien Potencier <fabien@symfony.com>
 */
final class TwilioTransport extends AbstractTransport
{
    protected const HOST = 'api.twilio.com';

    public function __construct(

Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInter


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Twilio\Tests\Webhook;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Notifier\Bridge\Twilio\Webhook\TwilioRequestParser;
use Symfony\Component\Webhook\Client\RequestParserInterface;
use Symfony\Component\Webhook\Exception\RejectWebhookException;
use Symfony\Component\Webhook\Test\AbstractRequestParserTestCase

uest(string $payload): Request
    {
        parse_str(trim($payload), $parameters);

        return Request::create('/', 'POST', $parameters, [], [], [
            'Content-Type' => 'application/x-www-form-urlencoded',
        ]);
    }

    protected sta

;

class TwilioRequestParserTest extends AbstractRequestParserTestCase
{
    protected function createRequestParser(): RequestParserInterface
    {
        return new TwilioRequestParser();
    }

    protected function createReq


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\RocketChat;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\N

**
 * @author Jeroen Spee <https://github.com/Jeroeny>
 */
final class RocketChatTransport extends AbstractTransport
{
    protected const HOST = 'rocketchat.com';

    public function __construct(
        #[\SensitiveParameter] private string $accessToken

otifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Slack;

use Symfony\Component\Notifier\Bridge\Slack\Block\SlackBlockInterface;
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackDividerBlock;
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackSectionBlock;
use Symfony\Component\Notifier\Exception\LogicException;
use Symfony\Component\Notifier\Message\MessageOptionsInter

tion __construct(
        private array $options = [],
    ) {
        if (\count($this->options['blocks'] ?? []) > self::MAX_BLOCKS) {
            throw new LogicException(\sprintf('Maximum number of "blocks" has been reached (%d).', self::MAX_BLOCKS));

face;
use Symfony\Component\Notifier\Notification\Notification;

/**
 * @author Fabien Potencier <fabien@symfony.com>
 */
class SlackOptions implements MessageOptionsInterface
{
    private const MAX_BLOCKS = 50;

    public func


/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Slack;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Fabien Potencier <fabien@symfo

tion($dsn, 'slack', $this->getSupportedSchemes());
        }

        $accessToken = $this->getUser($dsn);
        $channel = $dsn->getOption('channel');
        $host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
        $port = $dsn->getPort(

ny.com>
 */
final class SlackTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): SlackTransport
    {
        if ('slack' !== $dsn->getScheme()) {
            throw new UnsupportedSchemeExcep


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Slack\Tests\Block;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackContextBlock;

final class SlackContextBlockTest extends TestCase
{
    public function testCanBeInstantiated()
    {
        $context = new SlackCo

context->id('context_id');

        $this->assertSame([
            'type' => 'context',
            'elements' => [
                [
                    'type' => 'plain_text',
                    'text' => 'context text without emoji',

ntextBlock();
        $context->text('context text without emoji', false, false);
        $context->text('context text verbatim', true, false, true);
        $context->image('https://example.com/image.jpg', 'an image');
        $


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\Twilio\TwilioTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\Missi

nsportFactory
    {
        return new TwilioTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield [
            'twilio://host.test?from=0611223344',
            'twilio://accountSid:authToken@host.test?from=

ngRequiredOptionTestTrait;

final class TwilioTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function createFactory(): TwilioTra


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\RocketChat\RocketChatOptions;

final class RocketChatOptionsTest extends TestCase
{
    public function testRocketChatOptions()
    {
        $options = new RocketChatOptions([
            'ti

> 'Test Text',
                'color' => '#FF0000',
            ]],
        ], $options->toArray());

        $this->assertNull($options->getRecipientId());
    }

    public function testRocketChatOptionsWithChannel()
    {
        $options = (new Rocket

tle' => 'Test Title',
            'text' => 'Test Text',
            'color' => '#FF0000',
        ]);

        $this->assertSame([
            'attachments' => [[
                'title' => 'Test Title',
                'text' =


hp

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Slack\Block;

/**
 * @author Christophe Vergne <christophe.vergne@gmail.com>
 */
final class SlackButtonBlockElement extends AbstractSlackBlockElement
{
    public function __construct(string $text, ?string $url = null, ?string $styl

  ],
        ];

        if ($url) {
            $this->options['url'] = $url;
        }

        if ($style) {
            // primary or danger
            $this->options['style'] = $style;
        }

        if ($value) {
            $this->options['valu

e = null, ?string $value = null, ?array $confirm = null)
    {
        $this->options = [
            'type' => 'button',
            'text' => [
                'type' => 'plain_text',
                'text' => $text,


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\SmsFactor;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Not

 * @author Thibault Buathier <thibault.buathier@gmail.com>
 */
final class SmsFactorTransport extends AbstractTransport
{
    protected const HOST = 'api.smsfactor.com';

    public function __construct(
        #[\SensitiveParameter] private string $toke

ifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**


/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Slack;

use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;

/**
 * @author Maxim Dovydenok <dovydenok.maxim@gmail.com>
 */
fin

:__construct($original, $transport);
        $this->setMessageId($messageId);
    }

    public function getChannelId(): string
    {
        return $this->channelId;
    }

    public function getUpdateMessage(string $subject, array $options = []): ChatMe

al class SlackSentMessage extends SentMessage
{
    public function __construct(
        MessageInterface $original,
        string $transport,
        private string $channelId,
        string $messageId,
    ) {
        parent:


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\RocketChat;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author Jeroen Spee <https://github.com/Jeroeny>
 *
 * @see https://rocket.chat/docs/administrator-guides/integrations/
 * @see https://developer.rocket.chat/reference/ap

@var string[]|string[][] */
    private array $attachments;

    /** @var string[] */
    private array $payload;

    /**
     * @param string[]|string[][] $attachments
     * @param string[]            $payload
     */
    public function __construct(arr

i/rest-api/endpoints/core-endpoints/chat-endpoints/postmessage
 */
final class RocketChatOptions implements MessageOptionsInterface
{
    /** prefix with '@' for personal messages */
    private ?string $channel = null;

    /**


ony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\SmsSluzba;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

final class SmsSluzbaOptions implements MessageOptionsInterface
{
    public function __construct(
        private array $options = [],
    ) {
    }

    public function toArray(): array
    {
        return $this->options;
    }

    public func

null;
    }

    /**
     * @return $this
     */
    public function sendAt(\DateTime $sendAt): static
    {
        $sendAt->setTimezone(new \DateTimeZone('Europe/Prague'));

        $this->options['send_at'] = $sendAt->format('YmdHis');

        return

tion getRecipientId(): ?string
    {
        return


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Esendex;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

final class EsendexTransportFactory extends Abstr

->getSupportedSchemes());
        }

        $email = $this->getUser($dsn);
        $password = $this->getPassword($dsn);
        $accountReference = $dsn->getRequiredOption('accountreference');
        $from = $dsn->getRequiredOption('from');
        $hos

actTransportFactory
{
    public function create(Dsn $dsn): EsendexTransport
    {
        $scheme = $dsn->getScheme();

        if ('esendex' !== $scheme) {
            throw new UnsupportedSchemeException($dsn, 'esendex', $this


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\Esendex\EsendexTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\MissingRequiredOptionTestTra

       return new EsendexTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield [
            'esendex://host.test?accountreference=ACCOUNTREFERENCE&from=FROM',
            'esendex://email:password@host.test?a

it;

final class EsendexTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function createFactory(): EsendexTransportFactory
    {


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\Esendex\EsendexOptions;
use Symfony\Component\Notifier\Bridge\Esendex\EsendexTransport;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\No

ttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;

final class EsendexTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): EsendexTransport
    {
        return (ne

tifier\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\H


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Clickatell;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\No

*
 * @author Kevin Auvinet <k.auvinet@gmail.com>
 */
final class ClickatellTransport extends AbstractTransport
{
    protected const HOST = 'api.clickatell.com';

    public function __construct(
        #[\SensitiveParameter] private string $authToken,

tifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/*


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Clickatell;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Kevin Auvinet <k.auvinet@gmail.

        throw new UnsupportedSchemeException($dsn, 'clickatell', $this->getSupportedSchemes());
        }

        $authToken = $this->getUser($dsn);
        $from = $dsn->getOption('from');
        $host = 'default' === $dsn->getHost() ? null : $dsn->getH

com>
 */
final class ClickatellTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): ClickatellTransport
    {
        $scheme = $dsn->getScheme();

        if ('clickatell' !== $scheme) {


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\Clickatell\ClickatellTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

class ClickatellTransportFac

function createProvider(): iterable
    {
        yield [
            'clickatell://host.test?from=0611223344',
            'clickatell://authtoken@host.test?from=0611223344',
        ];
    }

    public static function supportsProvider(): iterable
    {

toryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): ClickatellTransportFactory
    {
        return new ClickatellTransportFactory();
    }

    public static


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\Clickatell\ClickatellTransport;
use Symfony\Component\Notifier\Exception\LogicException;
use Symfony\Component\Notifier

ansportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

final class ClickatellTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInter

\Exception\TransportException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\Tr


buted with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\LightSms;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use

t
{
    protected const HOST = 'www.lightsms.com';

    private const ERROR_CODES = [
        1 => 'Missing Signature',
        2 => 'Login not specified',
        3 => 'Text not specified',
        4 => 'Phone number not specified',
        5 => 'Sender n

Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Vasilij Duško <vasilij@prado.lt>
 */
final class LightSmsTransport extends AbstractTranspor


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\LightSms;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Vasilij Duško <vasilij@prado.lt>

ow new UnsupportedSchemeException($dsn, 'lightsms', $this->getSupportedSchemes());
        }

        $login = $this->getUser($dsn);
        $token = $this->getPassword($dsn);
        $from = $dsn->getRequiredOption('from');

        $host = 'default' ===

 */
final class LightSmsTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): LightSmsTransport
    {
        $scheme = $dsn->getScheme();

        if ('lightsms' !== $scheme) {
            thr


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\LightSms\LightSmsTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

final class LightSmsTransportFacto

on createProvider(): iterable
    {
        yield [
            'lightsms://host.test?from=0611223344',
            'lightsms://login:token@host.test?from=0611223344',
        ];
    }

    public static function supportsProvider(): iterable
    {

ryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): LightSmsTransportFactory
    {
        return new LightSmsTransportFactory();
    }

    public static functi


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Notifier\Bridge\LightSms\LightSmsTransport;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Sym

 public static function createTransport(?HttpClientInterface $client = null): LightSmsTransport
    {
        return new LightSmsTransport('accountSid', 'authToken', 'from', $client ?? new MockHttpClient());
    }

    public static function toStringProvid

fony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

final class LightSmsTransportTest extends TransportTestCase
{


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\AllMySms;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author gnito-org <https://github.com/gnito-org>
 */
final class AllMySmsOptions implements MessageOptionsInterface
{
    public function __construct(
        private array

'alerting'] = $alerting;

        return $this;
    }

    /**
     * @return $this
     */
    public function campaignName(string $campaignName): static
    {
        $this->options['campaignName'] = $campaignName;

        return $this;
    }

    /**

 $options = [],
    ) {
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * @return $this
     */
    public function alerting(int $alerting): static
    {
        $this->options[


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\AllMySms;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Noti

 * @author Quentin Dequippe <quentin@dequippe.tech>
 */
final class AllMySmsTransport extends AbstractTransport
{
    protected const HOST = 'api.allmysms.com';

    public function __construct(
        private string $login,
        #[\SensitiveParameter]

fier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\AllMySms;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Quentin Dequippe <quentin@dequipp

     throw new UnsupportedSchemeException($dsn, 'allmysms', $this->getSupportedSchemes());
        }

        $login = $this->getUser($dsn);
        $apiKey = $this->getPassword($dsn);
        $from = $dsn->getOption('from');
        $host = 'default' ===

e.tech>
 */
final class AllMySmsTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): AllMySmsTransport
    {
        $scheme = $dsn->getScheme();

        if ('allmysms' !== $scheme) {


/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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 = (n

test_unique_identifier')
            ->verbose(1);

        self::assertSame([
            'alerting' => 1,
            'date' => 'test_date',
            'campaignName' => 'test_campaign_name',
            'cliMsgId' => 'test_cli_msg_id',
            'sim

ew AllMySmsOptions())
            ->alerting(1)
            ->date('test_date')
            ->campaignName('test_campaign_name')
            ->cliMsgId('test_cli_msg_id')
            ->simulate(1)
            ->uniqueIdentifier('


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

final class AllMySmsTransportFacto

on createProvider(): iterable
    {
        yield [
            'allmysms://host.test',
            'allmysms://login:apiKey@host.test',
        ];

        yield [
            'allmysms://host.test?from=TEST',
            'allmysms://login:apiKey@host.tes

ryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): AllMySmsTransportFactory
    {
        return new AllMySmsTransportFactory();
    }

    public static functi


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsOptions;
use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransport;
use Symfony\Component\Notifie

ientInterface;

final class AllMySmsTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null, ?string $from = null): AllMySmsTransport
    {
        return new AllMySmsTransport('login', 'apiK

r\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\HttpCl


ony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Chatwork\ChatworkOptions;

class ChatworkOptionsTest extends TestCase
{
    public function testSetTo()
    {
        $options = new ChatworkOptions();
        $options->to(['abc', 'def']);
        $this->assertSame(['to' => ['abc', 'def

i');
        $this->assertSame(['to' => 'ghi'], $options->toArray());
    }

    public function testSetSelfUnread()
    {
        $options = new ChatworkOptions();
        $options->selfUnread(true);
        $this->assertSame(['selfUnread' => true], $opti

']], $options->toArray());

        $options->to('gh


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\Chatwork\ChatworkTransport;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\M

ransportInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

class ChatworkTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): TransportInterface
    {
        return (new

essage\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Component\Notifier\Transport\T


/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\LineNotify;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Akira Kurozumi <info@a-zu

ublic function create(Dsn $dsn): LineNotifyTransport
    {
        if (self::SCHEME !== $dsn->getScheme()) {
            throw new UnsupportedSchemeException($dsn, self::SCHEME, $this->getSupportedSchemes());
        }

        $token = $this->getUser($dsn

mi.net>
 */
final class LineNotifyTransportFactory extends AbstractTransportFactory
{
    private const SCHEME = 'linenotify';

    protected function getSupportedSchemes(): array
    {
        return [self::SCHEME];
    }

    p


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\LineNotify\LineNotifyTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

/**
 * @author

     return new LineNotifyTransportFactory();
    }

    public static function supportsProvider(): iterable
    {
        yield [true, 'linenotify://host'];
        yield [false, 'somethingElse://host'];
    }

    public static function createProvider():

Akira Kurozumi <info@a-zumi.net>
 */
final class LineNotifyTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): LineNotifyTransportFactory
    {


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\FakeSms;

use Psr\Log\LoggerInterface;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Me

<amakdessi@me.com>
 */
final class FakeSmsLoggerTransport extends AbstractTransport
{
    protected const HOST = 'default';

    public function __construct(
        private LoggerInterface $logger,
        ?HttpClientInterface $client = null,
        ?Eve

ssage\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Antoine Makdessi


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Mime\Email;
use Symfony\Component\Notifier\Bridge\FakeSms\FakeSmsEmailTransport;
use Symfony\Component\Notifier\Bridge\FakeSms\Mailer\DummyMailer;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMess

rtTestCase
{
    public static function createTransport(?HttpClientInterface $client = null, ?string $transportName = null): FakeSmsEmailTransport
    {
        $transport = (new FakeSmsEmailTransport(new DummyMailer(), 'recipient@email.net', 'sender@email

age;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

final class FakeSmsEmailTransportTest extends Transpo


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mailer\Transport\NullTransport;
use Symfony\Component\Notifier\Bridge\FakeSms\FakeSmsTransportFactory;
use Symfony\Component\Notifier\Exception\LogicException

r\Transport\Dsn;

final class FakeSmsTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function testMissingRequiredMailerDependency()
    {
        $this->exp

;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\MissingRequiredOptionTestTrait;
use Symfony\Component\Notifie


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\SmsSluzba;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Not

ymfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Dennis Fridrich <fridrich.dennis@gmail.com>
 */
final class SmsSluzbaTransport extends AbstractTransport
{
    protected const HOST = 'smsgateapi.sms-sluzba.cz';

    public function __constr

ifier\Transport\AbstractTransport;
use Symfony\Component\Serializer\Encoder\XmlEncoder;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use S


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\SmsSluzba\SmsSluzbaTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

final class SmsSlu

ublic static function createProvider(): iterable
    {
        yield [
            'sms-sluzba://host.test',
            'sms-sluzba://username:password@host.test',
        ];
    }

    public static function incompleteDsnProvider(): iterable
    {

zbaTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): SmsSluzbaTransportFactory
    {
        return new SmsSluzbaTransportFactory();
    }

    p


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\FakeChat;

use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\MessageInter

inal class FakeChatLoggerTransport extends AbstractTransport
{
    protected const HOST = 'default';

    public function __construct(
        private LoggerInterface $logger,
        ?HttpClientInterface $client = null,
        ?EventDispatcherInterface $

face;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Antoine Makdessi <amakdessi@me.com>
 */
f


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\FakeChat;

use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mime\Email;
use Symfony\Component\Notifier\Exception\UnsupportedMessag

nsport;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Oskar Stark <oskarstark@googlemail.com>
 */
final class FakeChatEmailTransport extends AbstractTransport
{
    protected const HOST = 'default';

    public function __construct(

eTypeException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Transport\AbstractTra


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Notifier\Bridge\FakeChat\FakeChatLoggerTransport;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message

ntInterface;

final class FakeChatLoggerTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null, ?LoggerInterface $logger = null): FakeChatLoggerTransport
    {
        return new FakeChatLog

\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Fixtures\TestOptions;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClie


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mailer\Transport\NullTransport;
use Symfony\Component\Notifier\Bridge\FakeChat\FakeChatTransportFactory;
use Symfony\Component\Notifier\Exception\LogicExcept

fier\Transport\Dsn;

final class FakeChatTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function testMissingRequiredMailerDependency()
    {
        $this-

ion;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\MissingRequiredOptionTestTrait;
use Symfony\Component\Noti


/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\FortySixElks;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Jon Gotlin <jon@jon.se>

ortedSchemeException($dsn, 'forty-six-elks', $this->getSupportedSchemes());
        }

        $host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
        $from = $dsn->getRequiredOption('from');

        return (new FortySixElksTransport($this

 */
final class FortySixElksTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): FortySixElksTransport
    {
        if ('forty-six-elks' !== $dsn->getScheme()) {
            throw new Unsupp


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use PHPUnit\Framework\Attributes\DataProvider;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\FortySixElks\FortySixElksTransport;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\No

ort\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

class FortySixElksTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): FortySixElksTransport
    {
        return

tifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transp


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Esendex;

use Symfony\Component\HttpClient\Exception\JsonException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Componen

e Symfony\Contracts\HttpClient\HttpClientInterface;

final class EsendexTransport extends AbstractTransport
{
    protected const HOST = 'api.esendex.com';

    public function __construct(
        private string $email,
        #[\SensitiveParameter] priv

t\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
us


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\Chatwork\ChatworkTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test

quiredOptionTestTrait;

    public function createFactory(): TransportFactoryInterface
    {
        return new ChatworkTransportFactory();
    }

    public static function supportsProvider(): iterable
    {
        yield [true, 'chatwork://host?room_id=t

\MissingRequiredOptionTestTrait;
use Symfony\Component\Notifier\Transport\TransportFactoryInterface;

class ChatworkTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRe


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\LineNotify\LineNotifyTransport;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Noti

pClientInterface;

/**
 * @author Akira Kurozumi <info@a-zumi.net>
 */
final class LineNotifyTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): LineNotifyTransport
    {
        return

fier\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\Htt


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\FakeSms;

use Psr\Log\LoggerInterface;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Notifier\Exception\LogicException;
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use

 Stark <oskarstark@googlemail.com>
 * @author Antoine Makdessi <amakdessi@me.com>
 */
final class FakeSmsTransportFactory extends AbstractTransportFactory
{
    public function __construct(
        private ?MailerInterface $mailer = null,
        private ?

 Symfony\Component\Notifier\Transport\Dsn;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author James Hemery <james@yieldstudio.fr>
 * @author Oskar


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\SmsSluzba;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Dennis Fridrich <fridrich.dennis

            throw new UnsupportedSchemeException($dsn, 'sms-sluzba', $this->getSupportedSchemes());
        }

        $username = $this->getUser($dsn);
        $password = $this->getPassword($dsn);
        $host = 'default' === $dsn->getHost() ? null : $

@gmail.com>
 */
final class SmsSluzbaTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): SmsSluzbaTransport
    {
        $scheme = $dsn->getScheme();

        if ('sms-sluzba' !== $scheme) {


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\SmsSluzba\SmsSluzbaTransport;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase

ClientInterface $client = null, ?string $from = null): SmsSluzbaTransport
    {
        return new SmsSluzbaTransport('username', 'password');
    }

    public static function toStringProvider(): iterable
    {
        yield ['sms-sluzba://smsgateapi.sms-

;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

final class SmsSluzbaTransportTest extends TransportTestCase
{
    public static function createTransport(?Http


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\FakeChat;

use Psr\Log\LoggerInterface;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Notifier\Exception\LogicException;
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
us

Antoine Makdessi <amakdessi@me.com>
 */
final class FakeChatTransportFactory extends AbstractTransportFactory
{
    public function __construct(
        private ?MailerInterface $mailer = null,
        private ?LoggerInterface $logger = null,
        ?Even

e Symfony\Component\Notifier\Transport\Dsn;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Oskar Stark <oskarstark@googlemail.com>
 * @author


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\FortySixElks;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\

Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Jon Gotlin <jon@jon.se>
 */
final class FortySixElksTransport extends AbstractTransport
{
    protected const HOST = 'api.46elks.com';

    public function __construct(
        private strin

Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use


ony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Esendex;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author gnito-org <https://github.com/gnito-org>
 */
final class EsendexOptions implements MessageOptionsInterface
{
    public function __construct(
        private array $options = [],
    ) {
    }

    public function getRecipientId(): ?s

 * @return $this
     */
    public function accountReference(string $accountReference): static
    {
        $this->options['accountreference'] = $accountReference;

        return $this;
    }

    public function toArray(): array
    {
        return $t

tring
    {
        return null;
    }

    /**


 part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Chatwork\ChatworkMessageBodyBuilder;

class ChatworkMessageBodyBuilderTest extends TestCase
{
    public function testSetTo()
    {
        $builder = new ChatworkMessa

his->assertSame(['ghi'], $property->getValue($builder));
    }

    public function testSetSelfUnread()
    {
        $builder = new ChatworkMessageBodyBuilder();
        $builder->selfUnread(true);
        $property = new \ReflectionProperty($builder, 'se

geBodyBuilder();
        $builder->to(['abc', 'def']);
        $property = new \ReflectionProperty($builder, 'to');
        $this->assertSame(['abc', 'def'], $property->getValue($builder));
        $builder->to('ghi');
        $t


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\FakeSms;

use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mime\Email;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInt

face;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author James Hemery <james@yieldstudio.fr>
 * @author Oskar Stark <oskarstark@googlemail.com>
 */
final class FakeSmsEmailTransport extends AbstractTransport
{
    protected const HOST =

erface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInter


buted with this source code.
 */

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

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Mime\Email;
use Symfony\Component\Notifier\Bridge\FakeChat\FakeChatEmailTransport;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Fixtures\TestOptions;
use Symfony\Component\Notifier\Tests\Mailer\Du

ansport(?HttpClientInterface $client = null, ?string $transportName = null): FakeChatEmailTransport
    {
        $transport = (new FakeChatEmailTransport(new DummyMailer(), 'recipient@email.net', 'sender@email.net', $client ?? new MockHttpClient()));

mmyMailer;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

final class FakeChatEmailTransportTest extends TransportTestCase
{
    public static function createTr


 This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Symfony\Component\Notifier\Bridge\FortySixElks\FortySixElksTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

class For

    }

    public static function createProvider(): iterable
    {
        yield [
            'forty-six-elks://host.test?from=Symfony',
            'forty-six-elks://api_username:api_password@host.test?from=Symfony',
        ];
    }

    public static f

tySixElksTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): FortySixElksTransportFactory
    {
        return new FortySixElksTransportFactory();


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\LineNotify;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\No

urozumi <info@a-zumi.net>
 */
final class LineNotifyTransport extends AbstractTransport
{
    protected const HOST = 'notify-api.line.me';

    public function __construct(
        #[\SensitiveParameter] private string $token,
        ?HttpClientInterface

tifier\Message\SentMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Akira K


ge.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

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

use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Notifier\Bridge\FakeSms\FakeSmsLoggerTransport;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\Sm

ransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null, ?LoggerInterface $logger = null): FakeSmsLoggerTransport
    {
        return new FakeSmsLoggerTransport($logger ?? new NullLogger(), $client ?? new MockHttp

sMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

final class FakeSmsLoggerTransportTest extends T