+ [misc] run getCondition unit test.

This commit is contained in:
qixinzhi
2024-09-04 16:10:43 +08:00
committed by 代婷婷
parent 858df6c829
commit e691f3c552
+13 -1
View File
@@ -9,6 +9,18 @@ title=biModel->getCondition();
timeout=0
cid=1
- 测试 `deleted` = '0' @`deleted` = '0'
- 测试 `t1`.`deleted` = '0' @`t1`.`deleted` = '0'
- 测试 `t1`.`project` = `t2`.`id` @`t1`.`project` = `t2`.`id`
- 测试 `t1`.`project` = `t2`.`id` @`t1`.`project` = `t2`.`id`
- 测试 `t1`.`project` = `t2`.`id` @`t1`.`project` = `t2`.`id`
- 测试 `t1`.`type` IN ('sprint', 'stage', 'kanban') @`t1`.`type` IN ('sprint', 'stage', 'kanban')
- 测试 `t1`.`type` NOT IN ('sprint', 'stage', 'kanban') @`t1`.`type` NOT IN ('sprint', 'stage', 'kanban')
- 测试 `t1`.`name` IS not null @`t1`.`name` IS not null
- 测试 `t1`.`name` IS not null`t1`.`name` IS null @`t1`.`name` IS null
*/
$bi = new biTest();
@@ -22,4 +34,4 @@ r($bi->getConditionTest('t1', 'type', 'in', null, "('sprint', 'stage', 'kanban')
r($bi->getConditionTest('t1', 'type', 'not in', null, "('sprint', 'stage', 'kanban')")) && p('') && e("`t1`.`type` NOT IN ('sprint', 'stage', 'kanban')"); // 测试 `t1`.`type` NOT IN ('sprint', 'stage', 'kanban')
r($bi->getConditionTest('t1', 'name', 'is', null, 'not null')) && p('') && e("`t1`.`name` IS not null"); // 测试 `t1`.`name` IS not null
r($bi->getConditionTest('t1', 'name', 'is', null, 'null')) && p('') && e("`t1`.`name` IS null"); // 测试 `t1`.`name` IS not null`t1`.`name` IS null
r($bi->getConditionTest('t1', 'name', 'is', null, 'null')) && p('') && e("`t1`.`name` IS null"); // 测试 `t1`.`name` IS not null`t1`.`name` IS null