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

29 lines
1.1 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::analysis();
timeout=0
cid=16229
- 步骤1分析control.php文件属性hasCreateMethod @1
- 步骤2分析model.php文件属性hasCreateMethod @1
- 步骤3分析不存在的文件 @1
- 步骤4分析空文件路径 @1
- 步骤5验证返回数组结构属性hasCorrectStructure @1
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
$editorTest = new editorModelTest();
r($editorTest->analysisControlTest()) && p('hasCreateMethod') && e(1); // 步骤1分析control.php文件
r($editorTest->analysisModelTest()) && p('hasCreateMethod') && e(1); // 步骤2分析model.php文件
r($editorTest->analysisNonExistentFileTest()) && p() && e(1); // 步骤3分析不存在的文件
r($editorTest->analysisEmptyPathTest()) && p() && e(1); // 步骤4分析空文件路径
r($editorTest->analysisStructureTest()) && p('hasCorrectStructure') && e(1); // 步骤5验证返回数组结构