+ [misc] Add unit tests for pivotModel::getDrillCols() method
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -227,3 +227,7 @@ $config->pivot->objectTableFields->product['totalEpics']['width'] = 100;
|
||||
$config->pivot->objectTableFields->product['totalRequirements']['width'] = 100;
|
||||
$config->pivot->objectTableFields->product['totalStories']['width'] = 100;
|
||||
$config->pivot->objectTableFields->product['unresolvedBugs']['width'] = 100;
|
||||
|
||||
$config->pivot->userTypeCols = array('assignedTo', 'openedBy', 'closedBy', 'resolvedBy', 'finishedBy', 'reviewer', 'reviewedBy', 'createdBy', 'editedBy', 'lastEditedBy', 'lastRunner', 'addedBy', 'modifiedBy', 'deletedBy', 'confirmedBy', 'PO', 'PM', 'account', 'user');
|
||||
$config->pivot->nameTypeCols = array('title', 'name');
|
||||
$config->pivot->reuseDtableFields = array('name', 'title', 'type', 'width', 'sortType', 'checkbox', 'link', 'map', 'statusMap');
|
||||
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
|
||||
title=测试 pivotModel::getDrillCols();
|
||||
timeout=0
|
||||
cid=0
|
||||
|
||||
- 步骤1:测试task对象类型,期望返回10个字段 @10
|
||||
- 步骤2:测试case对象类型(转换为testcase),期望返回8个字段 @8
|
||||
- 步骤3:测试product对象类型,期望返回10个字段 @10
|
||||
- 步骤4:测试user对象类型,期望返回5个字段 @5
|
||||
- 步骤5:测试bug对象类型,期望返回10个字段 @10
|
||||
|
||||
*/
|
||||
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/lib/pivot.unittest.class.php';
|
||||
|
||||
su('admin');
|
||||
|
||||
$pivotTest = new pivotTest();
|
||||
|
||||
r(count($pivotTest->getDrillCols('task'))) && p() && e('10'); // 步骤1:测试task对象类型,期望返回10个字段
|
||||
r(count($pivotTest->getDrillCols('case'))) && p() && e('8'); // 步骤2:测试case对象类型(转换为testcase),期望返回8个字段
|
||||
r(count($pivotTest->getDrillCols('product'))) && p() && e('10'); // 步骤3:测试product对象类型,期望返回10个字段
|
||||
r(count($pivotTest->getDrillCols('user'))) && p() && e('5'); // 步骤4:测试user对象类型,期望返回5个字段
|
||||
r(count($pivotTest->getDrillCols('bug'))) && p() && e('10'); // 步骤5:测试bug对象类型,期望返回10个字段
|
||||
Reference in New Issue
Block a user