<?php

namespace tests;
require __DIR__ . '/../vendor/autoload.php';

use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use PHPUnit\Framework\TestCase;
use app\models\user\User;
use crmeb\command\Task;
use crmeb\services\async\task\AsyncClass;
use tw\async\tasks\UserTaskClass;

class UserTaskTest extends TestCase
{
    public function test_generate_user_poster()
    {
        $app = new \think\App();
        $app->http->run();
        $r = AsyncClass::push('tw\async\tasks\UserTaskClass', [], 'generate_user_poster', [3]);
        // $user = User::getUserInfo(3);
        // list($suc, $data) = UserTaskClass::generate_user_poster($user);
        // self::assertTrue($suc);
        echo $r;
        self::assertTrue($r);
    }
}