znt/module/bi/test/model/getduckdbtmpdir.php

26 lines
1.2 KiB
PHP
Raw Permalink Normal View History

#!/usr/bin/env php
<?php
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
/**
title=测试 biModel::getDuckDBTmpDir();
timeout=0
cid=15169
- 步骤1正常获取DuckDB临时目录路径static=false @1
- 步骤2获取静态路径static=true @1
- 步骤3验证路径包含duckdb/bi目录结构 @1
- 步骤4测试返回结果类型 @1
- 步骤5再次验证方法调用稳定性 @1
*/
$biTest = new biModelTest();
r(is_string($biTest->getDuckDBTmpDirTest(false)) || $biTest->getDuckDBTmpDirTest(false) === false) && p() && e('1'); // 步骤1正常获取DuckDB临时目录路径static=false
r(is_string($biTest->getDuckDBTmpDirTest(true))) && p() && e('1'); // 步骤2获取静态路径static=true
r(strpos($biTest->getDuckDBTmpDirTest(true), 'duckdb' . DIRECTORY_SEPARATOR . 'bi' . DIRECTORY_SEPARATOR) !== false) && p() && e('1'); // 步骤3验证路径包含duckdb/bi目录结构
r(is_string($biTest->getDuckDBTmpDirTest(false)) || $biTest->getDuckDBTmpDirTest(false) === false) && p() && e('1'); // 步骤4测试返回结果类型
r(is_string($biTest->getDuckDBTmpDirTest(true))) && p() && e('1'); // 步骤5再次验证方法调用稳定性