easy-message/test/NotifyTest.php

42 lines
1.0 KiB
PHP
Raw Normal View History

2024-01-31 09:30:04 +08:00
<?php
declare(strict_types=1);
namespace MessageNotifyTest;
use MessageNotify\Channel\DingTalkChannel;
use MessageNotify\Channel\FeiShuChannel;
use MessageNotify\Channel\WechatChannel;
use MessageNotify\Contracts\MessageNotifyInterface;
use MessageNotify\Notify;
use MessageNotify\Template\Markdown;
use MessageNotify\Template\Text;
use PHPUnit\Framework\TestCase;
/**
* @internal
* @coversNothing
*/
class NotifyTest extends TestCase
{
public function testCase()
{
$dingTalkChannel = new DingTalkChannel();
$feiShuChannel = new FeiShuChannel();
$wechatChannel = new WechatChannel();
$markdown = new Markdown();
$text = new Text();
$notify = Notify::make()->setChannel(DingTalkChannel::class)
->setAt(['all'])
->setTitle('标题')
->setText('测试')
->setPipeline(MessageNotifyInterface::INFO)
->setTemplate(Markdown::class)
->send();
$this->assertEquals($notify, true);
}
}