withHeaders([ 'Authorization' => 'Bearer '. $this->token, ])->json('post','http://localhost/api/audienceManage/userGroup/add', [ 'name' => uniqid('liuzj-test-'), 'gzh_ids' => [6,8], 'tags' => [ 'attention_hour' => '0-6', 'in_48_hour' => 1, 'interact_hour' => '0-6', ], 'remark' => uniqid('', true) ]); $this->dumpJson($res); } public function testDetail() { $res = $this->withHeaders([ 'Authorization' => 'Bearer '. $this->token, ])->json('get','http://localhost/api/audienceManage/userGroup/detail', [ 'id' => 1 ]); $this->dumpJson($res); } public function testlist() { $res = $this->withHeaders([ 'Authorization' => 'Bearer '. $this->token, ])->json('get','http://localhost/api/audienceManage/userGroup/list', [ 'name' => '207' ]); $this->dumpJson($res); } public function testDelete() { $res = $this->withHeaders([ 'Authorization' => 'Bearer '. $this->token, ])->json('get','http://localhost/api/audienceManage/userGroup/delete', [ 'id' => 1 ]); $this->dumpJson($res); } public function testlistUser() { $timestamp = time(); $signKey = config('audience.ug.signKey'); $res = $this->withHeaders([ 'Authorization' => 'Bearer '. $this->token, ])->json('get','http://localhost/api/audienceManage/outUserGroup/listUser', [ 'timestamp' => $timestamp, 'sign' => md5($signKey. $timestamp), 'gzhId' => 8, 'ugId' => 2, 'nextUid' => 100, 'limit' => 10 ]); $this->dumpJson($res); } }