* Add switchDB by tests.

This commit is contained in:
liyang
2022-08-09 14:11:38 +08:00
parent 40ba4c8a9e
commit 3bd5ccc13f
881 changed files with 3058 additions and 1826 deletions
+4 -3
View File
@@ -2,6 +2,7 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/sso.class.php';
$db->switchDB();
su('admin');
/**
@@ -10,9 +11,9 @@ title=ssoModel->createUser();
cid=1
pid=1
用户存在的情况 >> fail
用户存在的情况 >> fail
用户信息错误的情况 >> fail
用户不存在的情况 >> bindUser1
用户不存在的情况 >> bindUser1
*/
@@ -41,4 +42,4 @@ $failUser = array(
r($sso->createTest($existsUser)) && p('status') && e('fail'); // 用户存在的情况
r($sso->createTest($failUser)) && p('status') && e('fail'); // 用户信息错误的情况
r($sso->createTest($newUser)) && p('account') && e('bindUser1'); // 用户不存在的情况
system("./ztest init");
$db->restoreDB();