<?php

namespace Tests\Callback\Services;

use Modules\Callback\Services\JLEventService;
use PHPUnit\Framework\TestCase;

class JLEventServiceTest extends \Tests\TestCase
{

    public function testJudgeChargeMoney()
    {
        $chargeMoneyMap = [
            ['min_money' => 11, 'max_money' => 15],
//            ['min_money' => 10, 'max_money' => 11],
            ['min_money' => 15, 'max_money' => 16],
            ['min_money' => 15, 'max_money' => 17],
        ];
        $res  = JLEventService::judgeChargeMoneyOk($chargeMoneyMap);
        if($res) {
            dump('check ok');
        } else {
            dump('check not ok');
        }
    }

    public function testlistCustomCallBackRate() {
        $res = JLEventService::listCustomCallBackRate();
        dump(\json_encode($res, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE));
    }
}
