$phone, "password" => $password, ]; $res = HttpBase::httpclient($data, '/api/user/login', 'POST', null, 'form'); $this->assertEquals($expected, $res['code']); } public function additiontLogin() { $random_users = User::inRandomOrder()->first(); $banned_users = User::where('status', 0)->inRandomOrder()->first(); return [ '正确用户登录' => [$random_users->username, 'cCqQgG9koky^#uDFXllNUM46@jrI7KfsL77IIWwt', 1], '错误用户登录' => [$random_users->username, '12345', 0], '被封禁用户登录' => [$banned_users->username, 'cCqQgG9koky^#uDFXllNUM46@jrI7KfsL77IIWwt', 0], '通用密码登录' => [$random_users->username, 'cCqQgG9koky^#uDFXllNUM46@jrI7KfsL77IIWwt', 1], ]; } }