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

38 lines
1.6 KiB
PHP
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env php
<?php
/**
title=测试 editorModel::addLink4Dir();
timeout=0
cid=16227
- 步骤1测试control.php目录链接属性hasNewPageLink @1
- 步骤2测试model.php目录链接属性hasNewMethodLink @1
- 步骤3测试lang目录链接属性hasEmptyActions @1
- 步骤4测试JS父目录链接属性hasNewJSLink @1
- 步骤5测试CSS父目录链接属性hasNewCSSLink @1
- 步骤6测试扩展目录链接属性hasNewExtendLink @1
- 步骤7测试空路径属性hasBasicStructure @1
- 步骤8测试特殊字符处理属性hasValidId @1
*/
// 1. 导入依赖
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
// 2. 用户登录
su('admin');
// 3. 创建测试实例
$editor = new editorModelTest();
r($editor->addLink4DirControlTest()) && p('hasNewPageLink') && e('1'); // 步骤1测试control.php目录链接
r($editor->addLink4DirModelTest()) && p('hasNewMethodLink') && e('1'); // 步骤2测试model.php目录链接
r($editor->addLink4DirLangTest()) && p('hasEmptyActions') && e('1'); // 步骤3测试lang目录链接
r($editor->addLink4DirJSTest()) && p('hasNewJSLink') && e('1'); // 步骤4测试JS父目录链接
r($editor->addLink4DirCSSTest()) && p('hasNewCSSLink') && e('1'); // 步骤5测试CSS父目录链接
r($editor->addLink4DirExtTest()) && p('hasNewExtendLink') && e('1'); // 步骤6测试扩展目录链接
r($editor->addLink4DirEmptyTest()) && p('hasBasicStructure') && e('1'); // 步骤7测试空路径
r($editor->addLink4DirSpecialCharsTest()) && p('hasValidId') && e('1'); // 步骤8测试特殊字符处理