<?php

namespace Tests;

use Illuminate\Foundation\Testing\TestCase as BaseTestCase;

abstract class UsedTestCase extends BaseTestCase
{
    use CreatesApplication;

    protected $token;
    protected function setUp(): void
    {
        parent::setUp(); // TODO: Change the autogenerated stub
        $tokenInfo = $this->post('http://localhost/api/login', [
//            'email' => 'catch@admin.com',
            'remember' => false,
//            'email' => 'xiaoli@qq.com',
            'password' => 'catchadmin',
            'email' => 'aa4@test.com',
        ])->json();
        $this->token = $tokenInfo['data']['token'];
    }

    public function dumpJson($res) {
        dump(\json_encode($res->json(), JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE));
    }
}
