+ [misc] Add unit tests for programZen::getPMListByPrograms() method

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
liugang
2025-09-19 11:05:47 +08:00
co-authored by Claude
parent 2152f5ba6b
commit 0dd949b033
4 changed files with 178 additions and 0 deletions
@@ -0,0 +1,31 @@
<?php
declare(strict_types = 1);
class programTest
{
public function __construct()
{
global $tester;
$this->tester = $tester;
$tester->app->setModuleName('program');
$tester->loadModel('program');
$this->objectZen = initReference('program');
}
/**
* Test getPMListByPrograms method.
*
* @param array $programs
* @access public
* @return mixed
*/
public function getPMListByProgramsTest($programs = array())
{
$method = $this->objectZen->getMethod('getPMListByPrograms');
$method->setAccessible(true);
$result = $method->invokeArgs($this->objectZen->newInstance(), array($programs));
if(dao::isError()) return dao::getError();
return $result;
}
}