* Autotest program.

This commit is contained in:
zhengrunyu
2022-01-18 10:41:40 +08:00
parent 8ebdc2a3b6
commit f7682bf7a2
13 changed files with 301 additions and 62 deletions
+18 -3
View File
@@ -2,7 +2,23 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
su('admin');
class Tester
{
public function __construct($user)
{
global $tester;
su('admin');
$this->program = $tester->loadModel('program');
}
public function getParentPM($programIdList)
{
return $this->program->getParentPM($programIdList);
}
}
$t = new Tester('admin');
/**
@@ -12,5 +28,4 @@ pid=1
*/
$program = $tester->loadModel('program');
r($program->getParentPM()) && p() && e(''); //
r($t->getParentPM('1')) && p() && e('0'); //