znt/module/editor/test/model/getsavepath.php

39 lines
2.1 KiB
PHP
Raw Permalink Normal View History

#!/usr/bin/env php
<?php
/**
title=测试 editorModel::getSavePath();
timeout=0
cid=16239
- 步骤1测试extendModel操作生成正确路径属性pathMatch @1
- 步骤2测试extendControl操作生成正确路径属性pathMatch @1
- 步骤3测试override操作生成正确路径属性pathMatch @1
- 步骤4测试newJS操作生成正确路径属性pathMatch @1
- 步骤5测试newCSS操作生成正确路径属性pathMatch @1
- 步骤6测试extendOther配置文件操作属性pathMatch @1
- 步骤7测试extendOther语言文件操作属性pathMatch @1
- 步骤8测试空文件名错误处理属性hasError @1
*/
// 1. 导入依赖
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
// 2. 用户登录
su('admin');
// 3. 创建测试实例
$editorTest = new editorModelTest();
// 4. 🔴 强制要求必须包含至少5个测试步骤
r($editorTest->getSavePathTest()) && p('pathMatch') && e('1'); // 步骤1测试extendModel操作生成正确路径
r($editorTest->getSavePathExtendControlTest()) && p('pathMatch') && e('1'); // 步骤2测试extendControl操作生成正确路径
r($editorTest->getSavePathOverrideTest()) && p('pathMatch') && e('1'); // 步骤3测试override操作生成正确路径
r($editorTest->getSavePathNewJSTest()) && p('pathMatch') && e('1'); // 步骤4测试newJS操作生成正确路径
r($editorTest->getSavePathNewCSSTest()) && p('pathMatch') && e('1'); // 步骤5测试newCSS操作生成正确路径
r($editorTest->getSavePathExtendOtherConfigTest()) && p('pathMatch') && e('1'); // 步骤6测试extendOther配置文件操作
r($editorTest->getSavePathExtendOtherLangTest()) && p('pathMatch') && e('1'); // 步骤7测试extendOther语言文件操作
r($editorTest->getSavePathEmptyFileNameTest()) && p('hasError') && e('1'); // 步骤8测试空文件名错误处理