* [misc] Fix unit tests for aiModel::getTestingLocation() method
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2047,7 +2047,9 @@ class aiTest
|
||||
*/
|
||||
public function getTestingLocationTest($prompt = null)
|
||||
{
|
||||
// 模拟getTestingLocation方法的逻辑,避免数据库依赖
|
||||
// 为了确保测试稳定性,完全模拟getTestingLocation方法的行为
|
||||
// 避免实际的数据库调用和依赖
|
||||
|
||||
if(empty($prompt) || !is_object($prompt) || empty($prompt->module)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2088,6 +2090,7 @@ class aiTest
|
||||
}
|
||||
}
|
||||
|
||||
// 对于未知模块,返回false
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ cid=0
|
||||
- 执行aiTest模块的getTestingLocationTest方法,参数是$productPrompt @ai-promptexecute-promptId=2&objectId=5.html
|
||||
- 执行aiTest模块的getTestingLocationTest方法,参数是$projectPrompt @ai-promptexecute-promptId=3&objectId=5.html
|
||||
- 执行aiTest模块的getTestingLocationTest方法,参数是$waterfallPrompt @ai-promptexecute-promptId=4&objectId=5.html
|
||||
- 执行aiTest模块的getTestingLocationTest方法,参数是$unknownPrompt @alse
|
||||
- 执行aiTest模块的getTestingLocationTest方法,参数是$unknownPrompt @0
|
||||
|
||||
*/
|
||||
|
||||
@@ -51,4 +51,4 @@ r($aiTest->getTestingLocationTest($myPrompt)) && p() && e('my-effort-type=all.ht
|
||||
r($aiTest->getTestingLocationTest($productPrompt)) && p() && e('ai-promptexecute-promptId=2&objectId=5.html');
|
||||
r($aiTest->getTestingLocationTest($projectPrompt)) && p() && e('ai-promptexecute-promptId=3&objectId=5.html');
|
||||
r($aiTest->getTestingLocationTest($waterfallPrompt)) && p() && e('ai-promptexecute-promptId=4&objectId=5.html');
|
||||
r($aiTest->getTestingLocationTest($unknownPrompt)) && p() && e(false);
|
||||
r($aiTest->getTestingLocationTest($unknownPrompt)) && p() && e('0');
|
||||
Reference in New Issue
Block a user