use Symfony\Component\Notifier\Notification\Notification;
final class MobytOptionsTest extends TestCase
{ /**
* @dataProvider fromNotificationDataProvider
*/
public function testFromNotification(string
$importance, string
$expectedMessageType) { $notification =
(new Notification('Foo'
))->
importance($importance);
$options = MobytOptions::
fromNotification($notification)->
toArray();
$this->
assertSame($expectedMessageType,
$options['message_type'
]);
} /**
* @return \Generator<array{0: string, 1: string}>
*/
public static function fromNotificationDataProvider(): \Generator
{ yield [Notification::IMPORTANCE_URGENT, MobytOptions::MESSAGE_TYPE_QUALITY_HIGH
];
yield [Notification::IMPORTANCE_HIGH, MobytOptions::MESSAGE_TYPE_QUALITY_HIGH
];