+ [misc] Add unit tests for tutorialModel::getColumn() method

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
liugang
2025-09-15 15:06:26 +08:00
co-authored by Claude
parent 03bb602914
commit 4b21963736
2 changed files with 42 additions and 0 deletions
@@ -841,4 +841,19 @@ class tutorialTest
return $result;
}
/**
* 测试获取新手模式看板列对象。
* Test get column.
*
* @access public
* @return object
*/
public function getColumnTest(): object
{
$result = $this->objectModel->getColumn();
if(dao::isError()) return dao::getError();
return $result;
}
}
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env php
<?php
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/tutorial.unittest.class.php';
su('admin');
/**
title=- 测试获取看板列对象的color属性 @
timeout=0
cid=333
- 执行tutorial模块的getColumnTest方法 属性id @1
- 执行tutorial模块的getColumnTest方法 属性type @backlog
- 执行tutorial模块的getColumnTest方法 属性name @Backlog
- 执行tutorial模块的getColumnTest方法 属性color @#333
- 执行tutorial模块的getColumnTest方法 属性limit @-1
*/
$tutorial = new tutorialTest();
r($tutorial->getColumnTest()) && p('id') && e('1');
r($tutorial->getColumnTest()) && p('type') && e('backlog');
r($tutorial->getColumnTest()) && p('name') && e('Backlog');
r($tutorial->getColumnTest()) && p('color') && e('#333');
r($tutorial->getColumnTest()) && p('limit') && e('-1');