邹景立 987ad41765 fix: Add .php-cs-fixer.php and update many files
Add PHP CS Fixer configuration (.php-cs-fixer.php) to enforce coding style and apply corresponding updates across the codebase. Numerous plugins (think-library and many think-plugs-*) and core config files (cache, database, phinx, worker) were updated along with controllers, services, models, storage adapters, helpers and tests to conform to style fixes and minor compatibility/refactors.
2026-02-01 02:01:37 +08:00

44 lines
1.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
declare(strict_types=1);
/**
* +----------------------------------------------------------------------
* | Payment Plugin for ThinkAdmin
* +----------------------------------------------------------------------
* | 版权所有 2014~2026 ThinkAdmin [ thinkadmin.top ]
* +----------------------------------------------------------------------
* | 官方网站: https://thinkadmin.top
* +----------------------------------------------------------------------
* | 开源协议 ( https://mit-license.org )
* | 免责声明 ( https://thinkadmin.top/disclaimer )
* | 会员特权 ( https://thinkadmin.top/vip-introduce )
* +----------------------------------------------------------------------
* | gitee 代码仓库https://gitee.com/zoujingli/ThinkAdmin
* | github 代码仓库https://github.com/zoujingli/ThinkAdmin
* +----------------------------------------------------------------------
*/
namespace plugin\tests;
use PHPUnit\Framework\TestCase;
use plugin\wuma\service\CodeService;
/**
* @internal
* @coversNothing
*/
class CodeTest extends TestCase
{
public function testCode()
{
// 10063 807019146688 112NU23VW81R
// 100000034 510144829202 6IC7V325CG2C
// 100000033 510245492492 6IE7I3ZPBQKC
$min = '100000034';
$num = '510144829202';
$enc = '6IC7V325CG2C';
$this->assertEquals(CodeService::num2min($num), $min, 'NUM 解码失败');
$this->assertEquals(CodeService::enc2min($enc), $min, 'ENC 解码失败');
}
}