use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Ntfy\NtfyOptions;
/**
* @author Mickael Perraud <mikaelkael.fr@gmail.com>
*/
class NtfyOptionsTest extends TestCase
{ public function testNtfyOptions() { $delay =
(new \
DateTime())->
add(new \
DateInterval('PT1M'
));
$ntfyOptions =
(new NtfyOptions()) ->
setMessage('test message'
) ->
setTitle('message title'
) ->
setPriority(NtfyOptions::PRIORITY_URGENT
) ->
setTags(['tag1', 'tag2'
]) ->
addTag('tag3'
) ->
setDelay($delay) ->
setActions([['action' => 'view', 'label' => 'View', 'url' => 'https://test.com'
]]) ->
addAction(['action' => 'http', 'label' => 'Open', 'url' => 'https://test2.com'
]) ->
setClick('https://test3.com'
) ->
setAttachment('https://filesrv.lan/space.jpg'
)