Files
EasySoft-ZenTaoPMS/module/dataview/test/model/__construct.php
T
2025-09-15 15:06:14 +08:00

29 lines
1.1 KiB
PHP
Executable File

#!/usr/bin/env php
<?php
/**
title=测试 dataviewModel::__construct();
timeout=0
cid=0
- 步骤1:验证构造函数正常执行属性result @normal
- 步骤2:验证父类model正确初始化属性result @1
- 步骤3:验证bi模块正确加载属性result @1
- 步骤4:验证dao数据库连接正常属性result @1
- 步骤5:验证模型实例类型正确属性result @1
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/dataview.unittest.class.php';
su('admin');
$dataview = new dataviewTest();
r($dataview->__constructTest('normal')) && p('result') && e('normal'); // 步骤1:验证构造函数正常执行
r($dataview->__constructTest('parentConstructor')) && p('result') && e('1'); // 步骤2:验证父类model正确初始化
r($dataview->__constructTest('biModel')) && p('result') && e('1'); // 步骤3:验证bi模块正确加载
r($dataview->__constructTest('dao')) && p('result') && e('1'); // 步骤4:验证dao数据库连接正常
r($dataview->__constructTest('modelInstance')) && p('result') && e('1'); // 步骤5:验证模型实例类型正确