* [unittest] add unit test for getunreadcount.

This commit is contained in:
wangyidong
2024-07-25 14:04:49 +08:00
committed by 孙广明
parent a49f724bef
commit 2fd692ca74
2 changed files with 20 additions and 1 deletions
@@ -6,7 +6,6 @@ include dirname(__FILE__, 5) . '/test/lib/init.php';
/**
title=测试 messageModel->batchSaveTodoNotice();
timeout=0
cid=0
- 检查代表信息的链接是否正确 @1
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env php
<?php
declare(strict_types=1);
include dirname(__FILE__, 5) . '/test/lib/init.php';
$notify = zenData('notify');
$notify->objectType->range('message');
$notify->toList->range('`,admin,`,`,user1,`');
$notify->status->range('wait,sended,read');
$notify->gen(10);
zenData('user')->gen(1);
su('admin');
global $tester;
$tester->loadModel('message');
$tester->message->app->user->account = 'admin';
r($tester->message->getUnreadCount()) && p() && e('3'); // 测试获取status不为 read 的条目数