本文整理汇总了PHP中testcase::modifyTplanDeviceCases方法的典型用法代码示例。如果您正苦于以下问题:PHP testcase::modifyTplanDeviceCases方法的具体用法?PHP testcase::modifyTplanDeviceCases怎么用?PHP testcase::modifyTplanDeviceCases使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testcase
的用法示例。
在下文中一共展示了testcase::modifyTplanDeviceCases方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tlPlatform
$platform_mgr = new tlPlatform($db, $args->testproject_id);
$tcase_mgr = new testcase($db);
if ($suite == 'testlink') {
$testlink_cases = $platform_mgr->getTplanDeviceCaseScript($tplan_id, $device_id);
} else {
$testlink_cases = $platform_mgr->getTplanDeviceCases($tplan_id, $device_id, $suite);
}
$gui = new stdClass();
$gui->needadd = array_diff($var_cases, $testlink_cases[0]);
$needdelete = array_diff($testlink_cases[0], $var_cases);
$gui->candelete = array_diff($testlink_cases[1], $var_cases);
$gui->cannotdelete = array_diff($needdelete, $gui->candelete);
$gui->added = $gui->deleted = array();
if (!is_null($gui->needadd)) {
foreach ($gui->needadd as $case) {
$rs = $tcase_mgr->modifyTplanDeviceCases($tplan_id, $device_id, $suite, $case, "add", $user_name);
if ($rs == 'Success') {
$gui->added[] = $case;
}
}
}
if (!is_null($gui->candelete)) {
foreach ($gui->candelete as $case) {
$rs = $tcase_mgr->modifyTplanDeviceCases($tplan_id, $device_id, $suite, $case, "delete", $user_name);
if ($rs == 'Success') {
$gui->deleted[] = $case;
}
}
}
if (!is_null($gui->cannotdelete)) {
foreach ($gui->cannotdelete as $case) {