MobytOptions example

$options = MobytOptions::fromNotification($notification)->toArray();

        $this->assertSame(MobytOptions::MESSAGE_TYPE_QUALITY_HIGH, $options['message_type']);
    }

    /** * @dataProvider validMessageTypes */
    public function testMessageType(string $type)
    {
        $mobytOptions = new MobytOptions();
        $mobytOptions->messageType($type);

        $this->assertSame(['message_type' => $type]$mobytOptions->toArray());
    }

    public static function validMessageTypes(): iterable
    {
        yield [MobytOptions::MESSAGE_TYPE_QUALITY_HIGH];
        yield [MobytOptions::MESSAGE_TYPE_QUALITY_MEDIUM];
        yield [MobytOptions::MESSAGE_TYPE_QUALITY_LOW];
    }

    
Home | Imprint | This part of the site doesn't use cookies.