* Fix code format.

This commit is contained in:
liyang
2022-09-09 16:05:02 +08:00
parent d1fe734dc6
commit 4e10ea8fe6
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ $config->zdPath = dirname(dirname(__FILE__)) . '/tools/zd';
include $testPath . 'config/config.php';
include $testPath. 'lib/db.class.php';
include $testPath. 'lib/rest.php';
$db = new db();
$db = new db();
$rest = new rest($config->test->base);
if(isset($config->test->account, $config->test->password))
+2 -4
View File
@@ -58,7 +58,7 @@ function getApi($apiRoot, $apiFiles, $info = false)
}
}
if($info === true) echo '没有数据库数据:' . PHP_EOL . $nodata . PHP_EOL . '没有API文件:' . PHP_EOL .$noApiFile . PHP_EOL;
if($info === true) echo '没有数据库数据:' . PHP_EOL . $nodata . PHP_EOL . '没有API文件:' . PHP_EOL . $noApiFile . PHP_EOL;
return $api;
}
@@ -76,8 +76,7 @@ function setValue($values)
$result .= "'$field' => '$value', ";
}
}
$result = trim($result, ", ");
$result .= ')';
$result = trim($result, ", ") . ')';
return $result;
}
@@ -123,7 +122,6 @@ function createCase($caseRoot, $apiList)
if($methodValue['example'] !== '')
{
$testData = "array(";
$examples = json_decode(str_replace('"', '"', $methodValue['example']), true);
foreach($examples as $key => $value)