znt/module/user/test/zen/responseforlocked.php

32 lines
1.2 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=测试 userZen::responseForLocked();
timeout=0
cid=19681
- 执行userTest模块的responseForLockedTest方法参数是'' 属性result @fail
- 执行userTest模块的responseForLockedTest方法参数是'json' 属性status @failed
- 执行userTest模块的responseForLockedTest方法参数是'web' 属性result @fail
- 执行userTest模块的responseForLockedTest方法参数是'invalid' 属性result @fail
- 执行userTest模块的responseForLockedTest方法参数是' '
- 属性result @fail
- 属性message @密码尝试次数太多请联系管理员解锁或10分钟后重试。
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/zen.class.php';
su('admin');
$userTest = new userZenTest();
r($userTest->responseForLockedTest('')) && p('result') && e('fail');
r($userTest->responseForLockedTest('json')) && p('status') && e('failed');
r($userTest->responseForLockedTest('web')) && p('result') && e('fail');
r($userTest->responseForLockedTest('invalid')) && p('result') && e('fail');
r($userTest->responseForLockedTest(' ')) && p('result,message') && e('fail,密码尝试次数太多请联系管理员解锁或10分钟后重试。');