diff --git a/module/testcase/test/lib/testcasezen.unittest.class.php b/module/testcase/test/lib/testcasezen.unittest.class.php new file mode 100644 index 0000000000..3c9c3b7834 --- /dev/null +++ b/module/testcase/test/lib/testcasezen.unittest.class.php @@ -0,0 +1,32 @@ +tester = $tester; + $tester->app->setModuleName('testcase'); + + $this->objectModel = $tester->loadModel('testcase'); + $this->testcaseZenTest = initReference('testcase'); + } + + /** + * 构建从用例库导入的数据。 + * Build data for importing from lib. + * + * @param int $productID + * @param string $branch + * @param int $libID + * @param array $postData + * @access public + * @return array + */ + public function buildDataForImportFromLibTest(int $productID, string $branch, int $libID, array $postData): array + { + foreach($postData as $key => $value) $_POST[$key] = $value; + return callZenMethod('testcase', 'buildDataForImportFromLib', [$productID, $branch, $libID]); + } +}