🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
1.2 KiB
PHP
Executable File
34 lines
1.2 KiB
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
|
include dirname(__FILE__, 2) . '/lib/dataview.unittest.class.php';
|
|
|
|
/**
|
|
|
|
title=测试 dataviewModel::isClickable();
|
|
timeout=0
|
|
cid=1
|
|
|
|
- 测试create操作可点击验证 @1
|
|
- 测试edit操作可点击验证 @1
|
|
- 测试空action操作可点击验证 @1
|
|
- 测试数字action操作可点击验证 @1
|
|
- 测试特殊字符action操作可点击验证 @1
|
|
|
|
*/
|
|
|
|
su('admin');
|
|
|
|
$dataviewTest = new dataviewTest();
|
|
|
|
$normalDataview = new stdclass();
|
|
$normalDataview->id = 1;
|
|
$normalDataview->name = 'test_dataview';
|
|
|
|
$emptyDataview = new stdclass();
|
|
|
|
r($dataviewTest->isClickableTest($normalDataview, 'create')) && p() && e('1'); //测试create操作可点击验证
|
|
r($dataviewTest->isClickableTest($normalDataview, 'edit')) && p() && e('1'); //测试edit操作可点击验证
|
|
r($dataviewTest->isClickableTest($emptyDataview, '')) && p() && e('1'); //测试空action操作可点击验证
|
|
r($dataviewTest->isClickableTest($normalDataview, '123')) && p() && e('1'); //测试数字action操作可点击验证
|
|
r($dataviewTest->isClickableTest($normalDataview, '@#$%')) && p() && e('1'); //测试特殊字符action操作可点击验证
|