From 8bf94cd13f6b4e8991135a955c37ca1783d1ea3f Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Tue, 24 Oct 2023 09:35:42 +0800 Subject: [PATCH] * Modify user test. --- module/user/test/model/batchcreate.php | 51 +++++++++++++------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/module/user/test/model/batchcreate.php b/module/user/test/model/batchcreate.php index 71bd304bb4..37489b859f 100755 --- a/module/user/test/model/batchcreate.php +++ b/module/user/test/model/batchcreate.php @@ -19,31 +19,30 @@ pid=1 $user = new userTest(); $normalUser = array(); -$normalUser['account'] = array(0 => 'newtestuser1', 1 => 'newtestuser2', 2 => 'newtestuser3'); -$normalUser['realname'] = array(0 => '新测试用户1', 1 => '新测试用户2', 2 => '新测试用户3'); -$normalUser['visions'] = array(0 => array('rnd'), 1 => array('rnd','lite'), 2 => array('lite')); -$normalUser['role'] = array(0 => 'qa', 1 => 'dev', 2 => 'pm'); -$normalUser['email'] = array(0 => 'testasd@163.com', 1 => '', 2 => '11773@qq.com'); -$normalUser['password'] = array(0 => 'Zentao123@', 1 => 'Zentao123@', 2 => 'Zentao123@'); -$normalUser['dept'] = array(0 => 1, 1 => 1, 2 => 1); -$normalUser['join'] = array(0 => '2023-01-01', 1 => '2023-01-01', 2 => '2023-01-01'); -$normalUser['type'] = array(0 => 'inside', 1 => 'inside', 2 => 'inside'); -$normalUser['group'] = array(0 => array(), 1 => array(), 2 => array()); -$normalUser['gender'] = array(0 => 'm', 1 => 'm', 2 => 'm'); -$normalUser['compnay'] = array(0 => '', 1 => '', 2 => ''); -$normalUser['commiter'] = array(0 => '', 1 => '', 2 => ''); -$normalUser['skype'] = array(0 => '', 1 => '', 2 => ''); -$normalUser['qq'] = array(0 => '', 1 => '', 2 => ''); -$normalUser['dingding'] = array(0 => '', 1 => '', 2 => ''); -$normalUser['weixin'] = array(0 => '', 1 => '', 2 => ''); -$normalUser['mobile'] = array(0 => '', 1 => '', 2 => ''); -$normalUser['slack'] = array(0 => '', 1 => '', 2 => ''); -$normalUser['whatsapp'] = array(0 => '', 1 => '', 2 => ''); -$normalUser['phone'] = array(0 => '', 1 => '', 2 => ''); -$normalUser['address'] = array(0 => '', 1 => '', 2 => ''); -$normalUser['zipcode'] = array(0 => '', 1 => '', 2 => ''); -$normalUser['ditto'] = array(0 => '', 1 => '', 2 => ''); - +$normalUser['account'] = array(1 => 'newtestuser1', 2 => 'newtestuser2', 3 => 'newtestuser3'); +$normalUser['realname'] = array(1 => '新测试用户1', 2 => '新测试用户2', 3 => '新测试用户3'); +$normalUser['visions'] = array(1 => array('rnd'), 2 => array('rnd','lite'), 3 => array('lite')); +$normalUser['role'] = array(1 => 'qa', 2 => 'dev', 3 => 'pm'); +$normalUser['email'] = array(1 => 'testasd@163.com', 2 => '', 3 => '11773@qq.com'); +$normalUser['password'] = array(1 => 'Zentao123@', 2 => 'Zentao123@', 3 => 'Zentao123@'); +$normalUser['dept'] = array(1 => 1, 2 => 1, 3 => 1); +$normalUser['join'] = array(1 => '2023-01-01', 2 => '2023-01-01', 3 => '2023-01-01'); +$normalUser['type'] = array(1 => 'inside', 2 => 'inside', 3 => 'inside'); +$normalUser['group'] = array(1 => array(), 2 => array(), 3 => array()); +$normalUser['gender'] = array(1 => 'm', 2 => 'm', 3 => 'm'); +$normalUser['compnay'] = array(1 => '', 2 => '', 3 => ''); +$normalUser['commiter'] = array(1 => '', 2 => '', 3 => ''); +$normalUser['skype'] = array(1 => '', 2 => '', 3 => ''); +$normalUser['qq'] = array(1 => '', 2 => '', 3 => ''); +$normalUser['dingding'] = array(1 => '', 2 => '', 3 => ''); +$normalUser['weixin'] = array(1 => '', 2 => '', 3 => ''); +$normalUser['mobile'] = array(1 => '', 2 => '', 3 => ''); +$normalUser['slack'] = array(1 => '', 2 => '', 3 => ''); +$normalUser['whatsapp'] = array(1 => '', 2 => '', 3 => ''); +$normalUser['phone'] = array(1 => '', 2 => '', 3 => ''); +$normalUser['address'] = array(1 => '', 2 => '', 3 => ''); +$normalUser['zipcode'] = array(1 => '', 2 => '', 3 => ''); +$normalUser['ditto'] = array(1 => '', 2 => '', 3 => ''); r($user->batchCreateUserTest($normalUser)) && p('0:account') && e('newtestuser1'); //获取插入的第一个用户的account zdTable('user')->gen(1); -r($user->batchCreateUserTest($normalUser)) && p('2:realname') && e('新测试用户3'); //获取插入的最后一个用户的realname +r($user->batchCreateUserTest($normalUser)) && p('1:realname') && e('新测试用户2'); //获取插入的最后一个用户的realname