1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- namespace Tests\Audience\Http\Controllers;
- use Modules\Audience\Http\Controllers\UserGroupController;
- use PHPUnit\Framework\TestCase;
- use Tests\UsedTestCase;
- class UserGroupControllerTest extends UsedTestCase
- {
- public function testAdd()
- {
- $res = $this->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);
- }
- }
|