znt/module/misc/test/model/gettableandstatus.php

27 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
include dirname(__FILE__, 5) . '/test/lib/init.php';
/**
title=测试 miscModel->getTableAndStatus();
timeout=0
cid=17215
- 输入表名查看数据库表状态使用情况等正常输出ok属性zt_user @ok
- 如被占用返回1 client is using or hasn't closed the table properly由于动态更新此处断言两张表正常状态属性zt_zoutput @ok
- 修复表。属性zt_user @the storage engine for the table doesn't support repair
- 修复表。属性zt_zoutput @the storage engine for the table doesn't support repair
- 这里测试传入不正确的type属性zt_account @0
*/
global $tester;
$tester->loadModel('misc');
r($tester->misc->getTableAndStatus('check')) && p('zt_user') && e('ok'); // 输入表名查看数据库表状态使用情况等正常输出ok
r($tester->misc->getTableAndStatus('check')) && p('zt_zoutput') && e('ok'); // 如被占用返回1 client is using or hasn't closed the table properly由于动态更新此处断言两张表正常状态
r($tester->misc->getTableAndStatus('repair')) && p('zt_user') && e("the storage engine for the table doesn't support repair"); // 修复表。
r($tester->misc->getTableAndStatus('repair')) && p('zt_zoutput') && e("the storage engine for the table doesn't support repair"); // 修复表。
r($tester->misc->getTableAndStatus('aaaaa')) && p('zt_account') && e('0'); // 这里测试传入不正确的type
?>