+ Add doc::getOrderedProjects unit test.

This commit is contained in:
tianshujie
2023-12-05 14:07:10 +08:00
parent 33e34b0e84
commit 72e56cbeab
2 changed files with 35 additions and 0 deletions
@@ -0,0 +1,22 @@
#!/usr/bin/env php
<?php
/**
title=测试 docModel->getOrderedProjects();
timeout=0
cid=1
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/doc.class.php';
zdTable('project')->gen(20);
zdTable('user')->gen(5);
su('admin');
$appends = array(0, 11);
$docTester = new docTest();
r($docTester->getOrderedProjectsTest($appends[0])) && p('1:11') && e('项目11'); // 获取系统中已排序的项目
r($docTester->getOrderedProjectsTest($appends[1])) && p('1:11') && e('项目11'); // 获取系统中包括ID=1已排序的项目