NovuOptions example

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Novu\NovuOptions;

class NovuOptionsTest extends TestCase
{
    /** * @group legacy */
    public function testToArray()
    {
        $options = new NovuOptions(
            123,
            'Joe',
            'Smith',
            'test@example.com',
            null,
            null,
            null,
            [],
        );

        $this->assertSame(
            [

        return (new NovuTransport('9c9ced75881ddc65c033273f466b42d1', $client ?? new MockHttpClient()))->setHost('host.test');
    }

    public static function toStringProvider(): iterable
    {
        yield ['novu://host.test', self::createTransport()];
    }

    public static function supportedMessagesProvider(): iterable
    {
        yield [new PushMessage('test', '{}', new NovuOptions(123, null, null, 'test@example.com', null, null, null, []))];
    }

    public static function unsupportedMessagesProvider(): iterable
    {
        yield [new SmsMessage('0611223344', 'Hello!')];
        yield [new DummyMessage()];
    }

    public function testWithErrorResponseThrows()
    {
        $response = $this->createMock(ResponseInterface::class);
        
Home | Imprint | This part of the site doesn't use cookies.