* Autotest program case.

This commit is contained in:
zhengrunyu
2022-01-18 10:22:42 +08:00
parent 172b4ade25
commit 8ebdc2a3b6
26 changed files with 702 additions and 4 deletions
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
class Tester
{
public function __construct($user)
{
global $tester;
su('admin');
$this->program = $tester->loadModel('program');
}
public function getBudgetLeft($programID)
{
$program = $this->program->getById(1);
return $this->program->getBudgetLeft($program);
}
}
$t = new Tester('admin');
/**
title=测试 programModel::getBudgetLeft($parentProgram);
cid=1
pid=1
*/
r($t->getBudgetLeft(1)) && p() && e('0'); // 查看父项目集id=1的预算剩余