当前位置: 首页>>代码示例>>PHP>>正文


PHP testproject::delete方法代码示例

本文整理汇总了PHP中testproject::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP testproject::delete方法的具体用法?PHP testproject::delete怎么用?PHP testproject::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在testproject的用法示例。


在下文中一共展示了testproject::delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dBug

$target_testproject->name = 'Testplan Class Unit Test';
$target_testproject->color = '';
$target_testproject->options = new stdClass();
$target_testproject->options->requirement_mgmt = 1;
$target_testproject->options->priority_mgmt = 1;
$target_testproject->options->automated_execution = 1;
$target_testproject->notes = 'Created to run testplan unit tests on ';
$target_testproject->active = 1;
$target_testproject->tcasePrefix = 'TPlanUnitTest';
// Create a test project that will be Test plan parent
$tproject_mgr = new testproject($db);
$info = $tproject_mgr->get_by_name($target_testproject->name);
if (!is_null($info)) {
    $name = $info[0]['name'];
    echo "TestProject with name <b><i>{$name}</i></b> exists!<br>Will be deleted and re-created";
    $tproject_mgr->delete($info[0]['id']);
}
$testproject_id = $tproject_mgr->create($target_testproject->name, $target_testproject->color, $target_testproject->options, $target_testproject->notes, $target_testproject->active, $target_testproject->tcasePrefix);
$testplan = new stdClass();
$testplan->name = 'Test Plan Code Testing';
$testplan->notes = 'Test Plan created running Code Testing code by TestLink Development Team';
echo "<pre> {$object_class} - create(\$name,\$notes,\$testproject_id)";
echo "</pre>";
echo "<pre> {$object_class} - create('{$testplan->name}','{$testplan->notes}',{$testproject_id})";
echo "</pre>";
$testplan->id = $obj_mgr->create($testplan->name, $testplan->notes, $testproject_id);
$info = $obj_mgr->get_by_id($testplan->id);
new dBug($info);
// ---------------------------------------------------------------------------------------------------------
// Build Manager
// ---------------------------------------------------------------------------------------------------------
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:31,代码来源:testplan.class.test.php


注:本文中的testproject::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。