+ [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:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user